]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
When generating the Location: header, mod_speling forgot
authorMartin Kraemer <martin@apache.org>
Thu, 23 Sep 1999 19:29:13 +0000 (19:29 +0000)
committerMartin Kraemer <martin@apache.org>
Thu, 23 Sep 1999 19:29:13 +0000 (19:29 +0000)
to escape the spelling-fixed uri. (Forward-Port from 1.3)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83916 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_speling.c

index f81c88f4b380e50cf7f4676d51dc0c402ca20255..2fc64c18a74d17f0a9feb2692f92b3c6571c7cf7 100644 (file)
@@ -408,10 +408,11 @@ static int check_speling(request_rec *r)
            && (candidates->nelts == 1
                || variant[0].quality != variant[1].quality)) {
 
-            nuri = ap_pstrcat(r->pool, url, variant[0].name, r->path_info,
-                             r->parsed_uri.query ? "?" : "",
-                             r->parsed_uri.query ? r->parsed_uri.query : "",
-                             NULL);
+            nuri = ap_escape_uri(r->pool, ap_pstrcat(r->pool, url,
+                                                    variant[0].name,
+                                                    r->path_info, NULL));
+           if (r->parsed_uri.query)
+               nuri = ap_pstrcat(r->pool, nuri, "?", r->parsed_uri.query, NULL);
 
             ap_table_setn(r->headers_out, "Location",
                          ap_construct_url(r->pool, nuri, r));