Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
http-testing
>
tortixd
> httpd-2.2.3-davputfail.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File httpd-2.2.3-davputfail.patch of Package tortixd
--- httpd-2.2.3/modules/dav/main/mod_dav.c.davputfail +++ httpd-2.2.3/modules/dav/main/mod_dav.c @@ -975,6 +975,7 @@ static int dav_method_put(request_rec *r apr_bucket_brigade *bb; apr_bucket *b; int seen_eos = 0; + int commit; bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); @@ -1025,8 +1026,12 @@ static int dav_method_put(request_rec *r apr_brigade_destroy(bb); - err2 = (*resource->hooks->close_stream)(stream, - err == NULL /* commit */); + /* Commit if either the resource already exists, or there was + * no error during reading/writing the body. */ + commit = (resource_state == DAV_RESOURCE_EXISTS) || (err == NULL); + + err2 = (*resource->hooks->close_stream)(stream, commit); + if (err2 != NULL && err == NULL) { /* no error during the write, but we hit one at close. use it. */ err = err2;