]> granicus.if.org Git - apache/commitdiff
Fix http redirecting for UserDir. Before this patch, the directive:
authorRyan Bloom <rbb@apache.org>
Tue, 28 May 2002 23:14:15 +0000 (23:14 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 28 May 2002 23:14:15 +0000 (23:14 +0000)
UserDir http://www.foo.com/~*/

The code would ignore the http:// and instead use the user's home directory

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

modules/mappers/mod_userdir.c

index 19408ee0c84474666e97ed4ff68511b257a01b78..9a29b35145df37e9c397f947e6eb542f6c1ba19e 100644 (file)
@@ -317,8 +317,8 @@ static int translate_userdir(request_rec *r)
             else
                 filename = apr_pstrcat(r->pool, userdir, "/", w, NULL);
         }
-        else if (ap_strchr_c(userdir, ':')) {
-            redirect = apr_pstrcat(r->pool, userdir, "/", w, dname, NULL);
+        else if (ap_strchr_c(x, ':')) {
+            redirect = apr_pstrcat(r->pool, x, w, dname, NULL);
             apr_table_setn(r->headers_out, "Location", redirect);
             return HTTP_MOVED_TEMPORARILY;
         }