From 455a86c4725f4e698737939c177b69d0687a441f Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sat, 27 Apr 2013 16:55:44 +0000 Subject: [PATCH] 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 --- CHANGES | 5 ++++- modules/dav/main/mod_dav.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) 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? */ -- 2.40.0