Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E362FD58D for ; Thu, 4 Oct 2012 13:00:36 +0000 (UTC) Received: (qmail 85030 invoked by uid 500); 4 Oct 2012 13:00:36 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 84973 invoked by uid 500); 4 Oct 2012 13:00:36 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 84959 invoked by uid 99); 4 Oct 2012 13:00:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 13:00:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 13:00:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1472423889D7; Thu, 4 Oct 2012 12:59:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1394035 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS server/protocol.c Date: Thu, 04 Oct 2012 12:59:51 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121004125952.1472423889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Thu Oct 4 12:59:50 2012 New Revision: 1394035 URL: http://svn.apache.org/viewvc?rev=1394035&view=rev Log: Merge r1392347 from trunk: core: ErrorDocument now works for requests without a Host header. PR: 48357 Submitted by: trawick Reviewed/backported by: jim Modified: httpd/httpd/branches/2.4.x/ (props changed) httpd/httpd/branches/2.4.x/CHANGES httpd/httpd/branches/2.4.x/STATUS httpd/httpd/branches/2.4.x/server/protocol.c Propchange: httpd/httpd/branches/2.4.x/ ------------------------------------------------------------------------------ Merged /httpd/httpd/trunk:r1392347 Modified: httpd/httpd/branches/2.4.x/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1394035&r1=1394034&r2=1394035&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original) +++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Thu Oct 4 12:59:50 2012 @@ -2,6 +2,9 @@ Changes with Apache 2.4.4 + *) core: ErrorDocument now works for requests without a Host header. + PR 48357. [Jeff Trawick] + *) prefork: Avoid logging harmless errors during graceful stop. [Joe Orton, Jeff Trawick] Modified: httpd/httpd/branches/2.4.x/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1394035&r1=1394034&r2=1394035&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/STATUS (original) +++ httpd/httpd/branches/2.4.x/STATUS Thu Oct 4 12:59:50 2012 @@ -89,12 +89,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * core: ErrorDocument now works for requests without a Host header. - (PR 48357) - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1392347 - 2.4.x patch: trunk patch works (minus CHANGES) - +1: trawick, minfrin, jim - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] Modified: httpd/httpd/branches/2.4.x/server/protocol.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/protocol.c?rev=1394035&r1=1394034&r2=1394035&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/server/protocol.c (original) +++ httpd/httpd/branches/2.4.x/server/protocol.c Thu Oct 4 12:59:50 2012 @@ -918,7 +918,7 @@ request_rec *ap_read_request(conn_rec *c 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; @@ -1086,7 +1086,7 @@ request_rec *ap_read_request(conn_rec *c * 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_INFO, 0, r, APLOGNO(00569) "client sent HTTP/1.1 request without hostname " "(see RFC2616 section 14.23): %s", r->uri); @@ -1102,14 +1102,8 @@ request_rec *ap_read_request(conn_rec *c 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); - goto traceout; - } - - 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);