You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2017/02/08 00:08:49 UTC

[Bug 60706] New: Undefined behavior in http_protocol::ap_method_name_of

https://bz.apache.org/bugzilla/show_bug.cgi?id=60706

            Bug ID: 60706
           Summary: Undefined behavior in http_protocol::ap_method_name_of
           Product: Apache httpd-2
           Version: 2.4.25
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: bugs@httpd.apache.org
          Reporter: mustangcoupe69@gmail.com
  Target Milestone: ---

We are using a module that makes use of http_protocol::ap_method_name_of.  The
behavior seems to have changed and it returns HEAD or GET rather than the
expected GET.  Restarting httpd randomly changes which method is returned for
the duration of the runtime.  This commit shows a change between 2.4.25 and
2.4.23 and seems potentially accounts for the behavior. 
https://github.com/apache/httpd/commit/2ba0ab8759920e11ecff5f2e04d7f019437a91c7#diff-e7207107d352028110203509bdfd8130

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60706] Undefined behavior in http_protocol::ap_method_name_of

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60706

--- Comment #2 from Ruediger Pluem <rp...@apache.org> ---
(In reply to Eric Covener from comment #1)

> 
> Revert or special case the reverse lookup of M_GET?

I guess we need a special case (no idea how to do it) as otherwise
HTTPProtocolOptions registeredmethods becomes broken. Or we revert and fix
HTTPProtocolOptions registeredmethods by other means for HEAD requests.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60706] Undefined behavior in http_protocol::ap_method_name_of

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60706

--- Comment #1 from Eric Covener <co...@gmail.com> ---
A little more info about the original change in the backport:

-  *) mod_http: Add the HEAD method to the lookup hash for completeness.
-      Trunk version of patch:
-         http://svn.apache.org/r1753257
-      Backport version for 2.4.x of patch:
-         Trunk version of patch works
-      +1: wrowe, ylavic, sf

/**
 * Get the method name associated with the given internal method
 * number.  Returns NULL if not recognized.
 * @param p A pool to use for temporary allocations.
 * @param methnum An integer value corresponding to an internal method number
 * @return The name corresponding to the method number
 */
AP_DECLARE(const char *) ap_method_name_of(apr_pool_t *p, int methnum);

Revert or special case the reverse lookup of M_GET?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60706] Undefined behavior in http_protocol::ap_method_name_of

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60706

Szőgyényi Gábor <sz...@freemail.hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |szg0000@freemail.hu

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60706] Undefined behavior in http_protocol::ap_method_name_of

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60706

Mike Lothian <mi...@fireburn.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@fireburn.co.uk

--- Comment #3 from Mike Lothian <mi...@fireburn.co.uk> ---
*** Bug 61501 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org