httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Baumann <>
Subject Re: segfault in dav_validate_request
Date Sun, 30 Dec 2007 15:58:26 GMT
Michael Clark wrote:
> I'm getting a segfault here in mod_dav from trunk (after a make clean) 
> running litmus using extras/httpd-dav.conf whereas it was working for me 
> last night. Not sure if this a work-in-progress. No time to file a bug 
> right now as i'm off for the weekend.
> -> running `locks':
> 0. init.................. pass
> 1. begin................. FAIL (Could not create new collection 
> `/uploads/litmus/' for tests: 405 Method Not Allowed
> Server must allow `MKCOL /uploads/litmus/' for tests to proceed)
>    /* Set the ETag header required by dav_meets_conditions() */
> ->    if ((err = (*resource->hooks->set_headers)(r, resource)) != NULL) {
>        return dav_push_error(r->pool, err->status, 0,
>                             "Unable to set up HTTP headers.",
>                             err);
>    }
Sorry for this. I did not expect this. But it is all those things I do 
not know and understand, why I reverted to code duplicating.
What I introduced in my ugly patch and do not understand well enough is
- call to (*resource->hooks->getetag)(resource)
- reference to resource->exists
Please check, that these can't cause similar trouble.
I tested my ugly code without any DEBUG_xxx-options and run it (local 
access only, testing of davfs2) for some month without problems.

I do not really understand how mod_dav/apache differentiate Etags send 
in the request (if-match etc.) and the Etag, that will be returned.
As far as I can judge:

Etags in conditional requests:
GET, DELETE, PUT, LOCK: most important
COPY, MOVE: useful
PROPPATCH: probably no need

Etag-header in response to DAV/HTTP-methods:
GET, HEAD: important to always send Etag
PROPFIND, PROPPATCH: Etag is undefined, should do no harm, but better 
not send Etag
DELETE: resource will have vanished afterwards, but Etag could be useful 
if DELETE fails.
MKCOL: Etag not defined on collections, but allowed. If mod_autoindex 
(?) is used, Etag would make sense.
COPY, MOVE, PUT: An Etag header for the newly created resource would be
very useful, but there are two restrictions:
- as long as mod_dav cannot create strong etags, there is not much use
- for COPY and MOVE on collections it's not defined and not forbidden
LOCK, UNLOCK: probably useless

I don't no about SEARCH and other extensions.

Although I know almost nothing about Apache programming, two remarks on 
With Hooks in an complex system like Apache: shouldn't there be a secure 
way to avoid calling NULL-Pointer-hooks? What about some kind of Dummy 
hook-function: the Dummy will log and return an error, and the hook will 
never point to NULL.

There seems to be something wrong. Setting DEBUG should not change the 
program in a significant way. You want to debug what's going on in the 
real program, not the debug-version.


View raw message