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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@101486
13f79535-47bb-0310-9956-
ffa450edef68
APACHE 1.3 STATUS: -*-text-*-
- Last modified at [$Date: 2003/10/18 12:55:12 $]
+ Last modified at [$Date: 2003/10/18 14:15:58 $]
Release:
Message-Id: <3F8C56E3.8050501@attglobal.net>
+1: jeff, jim
- * ap_die() should see if it needs to drop the connection before
- replacing r->status with 302
- Message-ID: <3F904295.6060701@attglobal.net>
- +1: jeff, roy, jim
-
* fix wording of warning for ErrorDocument 401 full-URL
Message-ID: <3F8BE7D2.6060209@attglobal.net>
+1: jeff, jim
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 <manniwood@planet-save.com>]
* 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);
}