Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 12688 invoked by uid 500); 4 Aug 2000 18:59:07 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 12670 invoked by uid 500); 4 Aug 2000 18:59:06 -0000 Delivered-To: apmail-apache-1.3-cvs@apache.org Date: 4 Aug 2000 18:59:05 -0000 Message-ID: <20000804185905.12643.qmail@locus.apache.org> From: rasmus@locus.apache.org To: apache-1.3-cvs@apache.org Subject: cvs commit: apache-1.3/src/main http_request.c rasmus 00/08/04 11:59:05 Modified: src/main http_request.c Log: Prevent a HEAD request from being converted to a GET request on an ErrorDocument redirect. Also save a couple of cycles by not duping a "GET" on top of a "GET" so the people who benchmark thousands of ErrorDocument redirects should see a slight improvement now... ;) Revision Changes Path 1.154 +8 -2 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.153 retrieving revision 1.154 diff -u -r1.153 -r1.154 --- http_request.c 2000/03/20 16:50:15 1.153 +++ http_request.c 2000/08/04 18:59:04 1.154 @@ -1035,8 +1035,14 @@ if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) { ap_table_setn(r->subprocess_env, "ERROR_NOTES", error_notes); } - r->method = ap_pstrdup(r->pool, "GET"); - r->method_number = M_GET; + /* + * If it is already a GET or a HEAD, don't change it + * (method_number for GET and HEAD is the same) + */ + if(r->method_number!=M_GET) { + r->method = ap_pstrdup(r->pool, "GET"); + r->method_number = M_GET; + } ap_internal_redirect(custom_response, r); return; }