From: Graham Leggett Date: Sat, 27 Apr 2013 16:55:44 +0000 (+0000) Subject: mod_dav: Ensure URI is correctly uriencoded on return. PR 54611 X-Git-Tag: 2.5.0-alpha~5530 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=455a86c4725f4e698737939c177b69d0687a441f;p=apache mod_dav: Ensure URI is correctly uriencoded on return. PR 54611 Patch submitted by Timothy Wood Tested by William Lewis git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476621 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 95b2296925..9d40d2498a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_dav: Ensure URI is correctly uriencoded on return. PR 54611 + [Timothy Wood ] + *) mod_dav: Sending a If or If-Match header with an invalid ETag doesn't - result in a 412 Precondition Failed. PR54610 [Timothy Wood + result in a 412 Precondition Failed. PR 54610 [Timothy Wood ] *) mod_dav: Make sure that when we prepare an If URL for Etag comparison, diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index 0fc0810ac6..90a6c5a88a 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -611,7 +611,9 @@ static int dav_created(request_rec *r, const char *locn, const char *what, const char *body; if (locn == NULL) { - locn = r->uri; + locn = r->unparsed_uri; + } else { + locn = ap_escape_uri(r->pool, locn); } /* did the target resource already exist? */