httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: updated Agenda for 1.2b7
Date Fri, 07 Feb 1997 14:05:49 GMT

>   * CGI outputting Location: redirect not working
>     This is an update to a previously submitted
>     bug report (see below). What seems to be
>     happening is that when the CGI returns a
>     redirect (via Location:), the new CGI gets
>     executed with the old "Content-Length" header
>     from the original POST CGI. But the content
>     has all already been read. I'm not an HTTP
>     expert but it seems like the second CGI should
>     not "inherit" the Content-Length header from
>     the first CGI. [archie@whistle.com]  
> 
>     Roy says "The problem is that the internal redirect is inheriting
>     the request state, which it should not be doing.  The solution
>     is to replace the hack in mod_cgi with a clean request without
>     the old Content-Length/Transfer-Encoding fields of the original."

This appears to work fine:

Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.12
diff -u -r1.12 http_protocol.c
--- http_protocol.c     1997/01/31 22:26:42     1.12
+++ http_protocol.c     1997/02/07 01:53:58
@@ -1186,7 +1186,7 @@
 
 int should_client_block (request_rec *r)
 {
-    if (is_HTTP_ERROR(r->status))
+    if (is_HTTP_ERROR(r->status) || r->method_number == M_GET)
        return 0;
 
     if (!r->read_chunked && (r->remaining <= 0))


I fear there will be unexpected side-effects
if mod_cgi is changed to use a use a new request. A cleanup can
wait for 2.0 IMO.



Mime
View raw message