httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Snow <>
Subject Re: mod_proxy_ftp BASE REF
Date Tue, 09 Aug 2005 14:38:47 GMT


Thanks. This patch definately will do the trick as I have already applied the 
same to test it. The browser reuses the original user:password@URL syntax for 
each subsequent relative URL access. This results in the same behaviour as 
using a squid proxy which does not use a base href. As yourself and Nick 
cannot find a reason for the base href either I feel more confident to patch 
our production systems without breaking anything.

I am unsure whether this would be considered a bug or not though without 
feedback from the original implementor. In my mind it doesn't seem to make 
sense, in normal operation, to rewrite content on a proxy overriding the 
client's view of the world. Any opinions on whether this would be considered 
a bug?


On Tuesday 09 August 2005 20:37, Graham Leggett wrote:
> Jon Snow wrote:
> > Does anyone have any idea why/whether the BASE HREF is required in the
> > proxy_ftp html code returned to the client? I would like to remove it as
> > it is breaking relative links for my client's browsers that are not using
> > an Authorization header. I have not found anywhere in the RFCs where it
> > is stipulated as a must for the BASE HREF or that browsers must use the
> > authorization header for requests subsequent to the initial authorization
> > using the user:password combination in the URL. e.g. ftp://
> >
> Also see no reason for the base href. Does this patch do the trick for you?
> Regards,
> Graham
> --

Index: modules/proxy/mod_proxy_ftp.c
--- modules/proxy/mod_proxy_ftp.c       (revision 231016)
+++ modules/proxy/mod_proxy_ftp.c       (working copy)
@@ -352,11 +352,10 @@
         /* print "ftp://host/" */
         str = apr_psprintf(p, DOCTYPE_HTML_3_2
                 "<html>\n <head>\n  <title>%s%s%s</title>\n"
-                "  <base href=\"%s%s%s\">\n </head>\n"
+                " </head>\n"
                 " <body>\n  <h2>Directory of "
                 "<a href=\"/\">%s</a>/%s",
                 site, basedir, ap_escape_html(p, path),
-                site, basedir, ap_escape_uri(p, path),
                 site, str);

         APR_BRIGADE_INSERT_TAIL(out, apr_bucket_pool_create(str, strlen(str),

View raw message