# HG changeset patch # User Petr Sumbera # Date 1353593730 28800 # Node ID cf97b079f90df4aaf051b5e97be7e496d61704c0 # Parent 77b26ec5be977fd08f1883eea205b0f396cb8094 15787737 SUNBT7164140 ErrorDocument can not handle 400status properly in case of HTTP 1.1 diff -r 77b26ec5be97 -r cf97b079f90d components/apache2/patches/bug48357.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/apache2/patches/bug48357.patch Thu Nov 22 06:15:30 2012 -0800 @@ -0,0 +1,39 @@ +https://issues.apache.org/bugzilla/show_bug.cgi?id=48357 + +--- server/protocol.c Tue Jan 24 12:02:19 2012 ++++ server/protocol.c Mon Oct 1 04:53:41 2012 +@@ -869,7 +869,7 @@ + request_rec *r; + apr_pool_t *p; + const char *expect; +- int access_status; ++ int access_status = HTTP_OK; + apr_bucket_brigade *tmp_bb; + apr_socket_t *csd; + apr_interval_time_t cur_timeout; +@@ -1021,7 +1021,7 @@ + * HTTP/1.1 mentions twice (S9, S14.23) that a request MUST contain + * a Host: header, and the server MUST respond with 400 if it doesn't. + */ +- r->status = HTTP_BAD_REQUEST; ++ access_status = HTTP_BAD_REQUEST; + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "client sent HTTP/1.1 request without hostname " + "(see RFC2616 section 14.23): %s", r->uri); +@@ -1037,14 +1037,8 @@ + ap_add_input_filter_handle(ap_http_input_filter_handle, + NULL, r, r->connection); + +- if (r->status != HTTP_OK) { +- ap_send_error_response(r, 0); +- ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); +- ap_run_log_transaction(r); +- return r; +- } +- +- if ((access_status = ap_run_post_read_request(r))) { ++ if (access_status != HTTP_OK ++ || (access_status = ap_run_post_read_request(r))) { + ap_die(access_status, r); + ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); + ap_run_log_transaction(r);