Received: (qmail 93629 invoked by uid 501); 15 Jan 2001 06:47:39 -0000 Message-Id: <20010115064739.93628.qmail@apache.org> Date: 15 Jan 2001 06:47:39 -0000 From: Nicolas Regez Reply-To: nicolas.regez@zurich.ch To: submit@bugz.apache.org Subject: Trailing slash redirect issued by mod_dir X-Send-Pr-Version: 3.110 >Number: 7068 >Category: mod_dir >Synopsis: Trailing slash redirect issued by mod_dir >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: apache >Arrival-Date: Sun Jan 14 22:50:00 PST 2001 >Closed-Date: Sun Jan 14 22:53:01 PST 2001 >Last-Modified: Sun Jan 14 22:53:01 PST 2001 >Originator: nicolas.regez@zurich.ch >Release: 1.3.6 >Organization: >Environment: SunOS 5.7, newest gcc >Description: We are doing some proxying/load-balancing to several upstream servers which have different "ServerName"s. When mod_dir issues a trailing slash redirect on a URI which corresponds to the name of a directory, it uses that "ServerName" in the "Location" http-header field. But the client does not know anything about our exotic DNS. >How-To-Repeat: http://zurich.ch/static >Fix: I suggest to modify the source of mod_dir according to the following output of "diff". What do you think? Is there a problem with a certain class of clients which do not find a redirection URL without protocol and hostname? $ diff mod_dir.c_original mod_dir.c 136,137c136,137 < ap_table_setn(r->headers_out, "Location", < ap_construct_url(r->pool, ifile, r)); --- > ap_table_setn(r->headers_out, "Location", ifile); > >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Sun Jan 14 22:53:01 PST 2001 State-Changed-Why: As per the HTTP spec, all HTTP redirects _MUST_ contain a URL including a scheme and hostname. It is not legal to just spit out a relative URL. And this is the wrong place to try to fix this anyway, since there are lots of other places redirects can be issued from. You need to either set the ServerName to the public name or change your setting of the UseCanonicalName directive. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]