httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@locus.apache.org
Subject cvs commit: apache-1.3/src/main http_request.c
Date Fri, 04 Aug 2000 18:59:05 GMT
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;
           }
  
  
  

Mime
View raw message