fielding 97/02/11 09:02:06
Modified: src CHANGES mod_cgi.c http_protocol.c
Log:
Fixed problem with mod_cgi-generated internal redirects trying to read
the request message-body twice. The owners of mod_fastcgi and mod_php
(and any other input-reading modules that might generate an internal
redirect) should check their code for the same problem.
Also removed the redundant check in should_client_block.
Submitted by: Archie Cobbs <[EMAIL PROTECTED]>, Roy Fielding
Revision Changes Path
1.159 +3 -0 apache/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache/src/CHANGES,v
retrieving revision 1.158
retrieving revision 1.159
diff -C3 -r1.158 -r1.159
*** CHANGES 1997/02/11 15:55:19 1.158
--- CHANGES 1997/02/11 17:02:03 1.159
***************
*** 1,5 ****
--- 1,8 ----
Changes with Apache 1.2b7
+ *) Fixed problem with mod_cgi-generated internal redirects trying to
+ read the request message-body twice. [Archie Cobbs and Roy Fielding]
+
*) Reduced timeout on lingering close, removed possibility of a blocked
read causing the child to hang, and stopped logging of errors if
the socket is not connected (reset by client). [Roy Fielding]
1.32 +6 -0 apache/src/mod_cgi.c
Index: mod_cgi.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_cgi.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C3 -r1.31 -r1.32
*** mod_cgi.c 1997/01/25 03:08:33 1.31
--- mod_cgi.c 1997/02/11 17:02:03 1.32
***************
*** 482,487 ****
--- 482,493 ----
r->method = pstrdup(r->pool, "GET");
r->method_number = M_GET;
+ /* We already read the message body (if any), so don't allow
+ * the redirected request to think it has one. We can ignore
+ * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR.
+ */
+ table_unset(r->headers_in, "Content-Length");
+
internal_redirect_handler (location, r);
return OK;
}
1.100 +0 -3 apache/src/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -C3 -r1.99 -r1.100
*** http_protocol.c 1997/02/11 06:33:34 1.99
--- http_protocol.c 1997/02/11 17:02:04 1.100
***************
*** 1237,1245 ****
int should_client_block (request_rec *r)
{
- if (is_HTTP_ERROR(r->status))
- return 0;
-
if (!r->read_chunked && (r->remaining <= 0))
return 0;
--- 1237,1242 ----