httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Korthof ...@organic.com>
Subject Re: Redirection problem under 1.2b11-dev
Date Fri, 23 May 1997 19:42:58 GMT
This looks like a problem with some code which was introduced to remove
extraneous response codes on error responses -- Location isn't return in
some case. Using grep to look through the source code, everywhere the
Location header set (except mod_negotiation), it's set in r->headers_out,
which is ignored by the new code. 

Two ways to solve this -- either grab Location from the right place (which
is a fairly extensive patch), or pull it out of r->headers_out and put it
in r->err_headers_out in send_error_response.  A patch to do the later
follows -- IMO, it might make more sense to do the former, but I'm going
to do the later because it's easier and less likely to introduce new bugs.

Should any of the following also be used even on error responses?

"Content-MD5", "Set-Cookie" (??), "Transfer-Encoding",

    and stuff set in....

mod_cern_meta, mod_status, mod_headers

My patch (I'll be happy to rewrite this to deal with other headers if
appropriate):
*********
*** http_protocol.c.orig3	Fri May 23 12:36:03 1997
--- http_protocol.c	Fri May 23 12:36:07 1997
***************
*** 1699,1703 ****
--- 1699,1706 ----
  	 * error or redirect.
  	 */
+  
  	r->headers_out = r->err_headers_out;
+         if (location && *location)
+           table_set(r->headers_out, "Location", location);
  	r->err_headers_out = NULL;
  	r->content_language = NULL;
*********

     -- Ed Korthof        |  Web Server Engineer --
     -- ed@organic.com    |  Organic Online, Inc --
     -- (415) 278-5676    |  Fax: (415) 284-6891 --

On Fri, 23 May 1997, Ralf S. Engelschall wrote:

> 
> Hmmm.... although I've not much time today, a did a quick jump into the
> problem and it showed that 1.2b11-dev on redirects does not send the
> "Location"-header:
> 
> | :> telnet en1 80
> | Trying 192.76.162.40...
> | Connected to en1.engelschall.com.
> | Escape character is '^]'.
> | GET / HTTP/1.0
> | 
> | HTTP/1.1 302 Moved Temporarily
> | Date: Fri, 23 May 1997 11:53:32 GMT
> | Server: Apache/1.2b11-dev BnP-w3s/2.3.2
> | Connection: close
> | Content-Type: text/html
> | 
> | blabla...
> 
> Netscape assumes a standard page as a result and Lynx even shouts with an
> error. Any quick ideas according to recent patches between 1.2b10 (where
> redirects worked correct) and the 1.2b11-dev from yesterday?
> 
> Greetings,
>                                        Ralf S. Engelschall
>                                        rse@engelschall.com
>                                        www.engelschall.com
> 
> 


Mime
View raw message