httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54145] New: Poor error handling in dav_method_put()
Date Wed, 14 Nov 2012 22:48:09 GMT

          Priority: P2
            Bug ID: 54145
           Summary: Poor error handling in dav_method_put()
          Severity: minor
    Classification: Unclassified
                OS: All
          Hardware: All
            Status: NEW
           Version: 2.5-HEAD
         Component: mod_dav
           Product: Apache httpd-2

dav_method_put() in the mod_dav module has several issues with error handling.

1) The error reported when receiving an error from ap_get_brigade() is "Could
not get next brigade" which is utterly useless for an end user in understanding
what happened.  Further on down the error message generated for an error from
apr_bucket_read() is "An error occurred while reading the request body".  

The call to ap_get_brigade() is where the actual read of the request body
happens.  So if there is any error actually reading the data from the socket
(e.g. socket closes prematurely) then the "Could not get next brigade" error
will be logged.  The apr_bucket_read() is actually reading from bucket which
was created from the ap_get_brigade() call and is very unlikely to fail since
it's essentially just reading data in memory.

2) It does consumes and does not log the error messages from the DAV provider
module that is handling the actual actions that the PUT represents when there
is also an error handling the protocol.  In many cases these errors may be more
useful than the generic HTTP protocol error.  

Consider an SVN client where the PUT is sending an svndiff.  For some reason
the connection is interrupted.  "Could not get next brigade" is logged since
that's the error that mod_dav had, but when mod_dav calls the close_stream
function on the mod_dav_svn module it gets back "Unexpected end of svndiff
input", which is incredibly useful since it implies to the end user that the
connection was interrupted somehow.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message