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 2012/08/09 17:47:54 UTC

[Bug 53686] New: Status "501 Not Implemented" sent very late

https://issues.apache.org/bugzilla/show_bug.cgi?id=53686

          Priority: P2
            Bug ID: 53686
          Assignee: bugs@httpd.apache.org
           Summary: Status "501 Not Implemented" sent very late
          Severity: normal
    Classification: Unclassified
          Reporter: whatthebug@mailfish.de
          Hardware: PC
            Status: NEW
           Version: 2.2.22
         Component: Core
           Product: Apache httpd-2

Is there any reason why HTTP_NOT_IMPLEMENTED is returned to the client rather
late by default_handler() in server/core.c instead of having it handled by
ap_read_request() in server/protocol.c?

The way it is now causes Apache to unnecessarily dive down into the document
root, reading .htaccess files, stat()ing index documents etc. Moving it to
ap_read_request() would avoid that overhead.

NB, this might be related to Bug 51201.

-- 
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 53686] Status "501 Not Implemented" sent very late

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

--- Comment #2 from Carsten Gaebler <wh...@mailfish.de> ---
This bug is not about deciding whether or not a request method is valid for the
requested resource. It's about deciding whether or not a request method is
valid in the first place.

Modules register any additional methods at startup, don't they? So any method
not registered at startup and therefore not known to Apache could be rejected
right after reading the headers (unless there is a way to register methods at
runtime).

-- 
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 53686] Status "501 Not Implemented" sent very late

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

--- Comment #4 from Carsten Gaebler <wh...@mailfish.de> ---
Created attachment 29210
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29210&action=edit
Return 501 for invalid methods as soon as the headers have been read

I have created a patch that checks for invalid request methods in
ap_read_request().

-- 
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 53686] Status "501 Not Implemented" sent very late

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

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Eric Covener <co...@gmail.com> ---
(In reply to comment #0)
> Is there any reason why HTTP_NOT_IMPLEMENTED is returned to the client
> rather late by default_handler() in server/core.c instead of having it
> handled by ap_read_request() in server/protocol.c?
> 
> The way it is now causes Apache to unnecessarily dive down into the document
> root, reading .htaccess files, stat()ing index documents etc. Moving it to
> ap_read_request() would avoid that overhead.
> 
> NB, this might be related to Bug 51201.

Modules need some way to have a look at a request incl. method to see if
they're willing to handle it, it could be done "earlier" in a new hook, but
those modules would probably want their per-directory config completed and
maybe even know what file the request mapped to before deciding.

-- 
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 53686] Status "501 Not Implemented" sent very late

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

--- Comment #5 from Carsten Gaebler <wh...@mailfish.de> ---
Any chance to see this in the next release?

-- 
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 53686] Status "501 Not Implemented" sent very late

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

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #3 from Eric Covener <co...@gmail.com> ---
(In reply to comment #2)
> This bug is not about deciding whether or not a request method is valid for
> the requested resource. It's about deciding whether or not a request method
> is valid in the first place.
> 
> Modules register any additional methods at startup, don't they? So any
> method not registered at startup and therefore not known to Apache could be
> rejected right after reading the headers (unless there is a way to register
> methods at runtime).

yes -- startup only.  I think it's fair, but reclassifying as enhancement

-- 
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 53686] Status "501 Not Implemented" sent very late

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

--- Comment #6 from Carsten Gaebler <wh...@mailfish.de> ---
Ping?

-- 
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 53686] Status "501 Not Implemented" sent very late

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

Carsten Gaebler <wh...@mailfish.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
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