You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2003/10/18 16:15:59 UTC
cvs commit: apache-1.3/src/main http_request.c
trawick 2003/10/18 07:15:58
Modified: . STATUS
src CHANGES
src/main http_request.c
Log:
If a request fails and the client will be redirected to another URL
due to ErrorDocument, see if we need to drop the connection after
sending the 302 response. This fixes a problem where Apache treated
the body of the failed request as the next request on a keepalive
connection. The subsequent 501 error sent to the browser prevented
some browsers from fetching the error document.
Reviewed by: roy, jim
Revision Changes Path
1.1054 +1 -6 apache-1.3/STATUS
Index: STATUS
===================================================================
RCS file: /home/cvs/apache-1.3/STATUS,v
retrieving revision 1.1053
retrieving revision 1.1054
diff -u -r1.1053 -r1.1054
--- STATUS 18 Oct 2003 12:55:12 -0000 1.1053
+++ STATUS 18 Oct 2003 14:15:58 -0000 1.1054
@@ -58,11 +58,6 @@
Message-Id: <3F...@attglobal.net>
+1: jeff, jim
- * ap_die() should see if it needs to drop the connection before
- replacing r->status with 302
- Message-ID: <3F...@attglobal.net>
- +1: jeff, roy, jim
-
* fix wording of warning for ErrorDocument 401 full-URL
Message-ID: <3F...@attglobal.net>
+1: jeff, jim
1.1907 +7 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1906
retrieving revision 1.1907
diff -u -r1.1906 -r1.1907
--- CHANGES 16 Oct 2003 17:23:26 -0000 1.1906
+++ CHANGES 18 Oct 2003 14:15:58 -0000 1.1907
@@ -1,5 +1,12 @@
Changes with Apache 1.3.29
+ *) If a request fails and the client will be redirected to another URL
+ due to ErrorDocument, see if we need to drop the connection after
+ sending the 302 response. This fixes a problem where Apache treated
+ the body of the failed request as the next request on a keepalive
+ connection. The subsequent 501 error sent to the browser prevented
+ some browsers from fetching the error document. [Jeff Trawick]
+
*) Fixed mod_usertrack to not get false positive matches on the
user-tracking cookie's name. PR 16661.
[Manni Wood <ma...@planet-save.com>]
1.171 +8 -0 apache-1.3/src/main/http_request.c
Index: http_request.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -r1.170 -r1.171
--- http_request.c 7 Jul 2003 00:34:10 -0000 1.170
+++ http_request.c 18 Oct 2003 14:15:58 -0000 1.171
@@ -1117,7 +1117,15 @@
* apache code, and continue with the usual REDIRECT handler.
* But note that the client will ultimately see the wrong
* status...
+ *
+ * Also, before updating r->status, we may need to ensure that
+ * the connection is dropped. For example, there may be
+ * unread request body that would confuse us if we try
+ * to read another request.
*/
+ if (ap_status_drops_connection(r->status)) {
+ r->connection->keepalive = -1;
+ }
r->status = REDIRECT;
ap_table_setn(r->headers_out, "Location", custom_response);
}