components/apache2/patches/bug48357.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Tue, 21 Jul 2015 08:35:55 -0700
changeset 4696 96b9957387bf
parent 1008 85cbcf3980ca
permissions -rw-r--r--
21479636 Upgrade Apache Web Server to version 2.2.31 21479095 problem in UTILITY/APACHE

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
@@ -871,7 +871,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;
@@ -1049,7 +1049,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);
@@ -1065,14 +1065,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);