diff options
author | Ben Reser <breser@apache.org> | 2014-05-06 07:00:21 +0200 |
---|---|---|
committer | Ben Reser <breser@apache.org> | 2014-05-06 07:00:21 +0200 |
commit | fb5675a5b8922bc9c605a589b795c37aa14a2f75 (patch) | |
tree | 6d41f222a3e870fa1633225f8baecf4a5714378d /modules/dav | |
parent | fix Doxygen markup error (diff) | |
download | apache2-fb5675a5b8922bc9c605a589b795c37aa14a2f75.tar.xz apache2-fb5675a5b8922bc9c605a589b795c37aa14a2f75.zip |
mod_dav: Fix invalid Location header when a resource is created by passing an
absolute URI on the request line.
Using r->unparsed_uri is wrong since it might contain a scheme, hostname and
port. See section 5.1.2 of RFC 2616, an absolute URI is allowed. The
unparsed_uri field is absolutely unparsed. The current code causes the
Location header to end up having the scheme, host and port included twice.
* modules/dav/main/mod_dav.c
(dav_created): Call ap_escape_uri() on r->uri when caller doesn't provide a
location.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592655 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/dav')
-rw-r--r-- | modules/dav/main/mod_dav.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index 93346250c1..77a3b12a12 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -611,7 +611,7 @@ static int dav_created(request_rec *r, const char *locn, const char *what, const char *body; if (locn == NULL) { - locn = r->unparsed_uri; + locn = ap_escape_uri(r->pool, r->uri); } /* did the target resource already exist? */ |