httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sas...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c
Date Thu, 02 Nov 2000 21:31:40 GMT
sascha      00/11/02 13:31:39

  Modified:    src/main http_core.c
  Log:
  Fix last commit which was done from the wrong tree which contained
  an incomplete version of the default_handler change.
  
  This version gets always rid of the request body, regardless of the
  method.
  
  Revision  Changes    Path
  1.195     +11 -8     apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.194
  retrieving revision 1.195
  diff -u -u -r1.194 -r1.195
  --- http_core.c	2000/11/02 20:48:48	1.194
  +++ http_core.c	2000/11/02 21:31:37	1.195
  @@ -2951,8 +2951,16 @@
       int bld_content_md5 = 
           (d->content_md5 & 1) && r->output_filters->frec->ftype
!= AP_FTYPE_CONTENT;
   
  -    ap_allow_methods(r, MERGE_ALLOW, "GET", "OPTIONS", NULL);
  +    ap_allow_methods(r, MERGE_ALLOW, "GET", "OPTIONS", "POST", NULL);
   
  +    if (r->method_number == M_POST) {
  +        if ((errstatus = handle_request_body(r)) != APR_SUCCESS) {
  +            return errstatus;
  +        }
  +    } else if ((errstatus = ap_discard_request_body(r)) != OK) {
  +        return errstatus;
  +    }
  +    
       if (r->method_number == M_INVALID) {
   	ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
   		    "Invalid method in request %s", r->the_request);
  @@ -2971,13 +2979,8 @@
   		      : r->filename);
   	return HTTP_NOT_FOUND;
       }
  -    if (r->method_number == M_POST) {
  -        if ((errstatus = handle_request_body(r)) != APR_SUCCESS) {
  -            return errstatus;
  -        }
  -    } else if ((errstatus = ap_discard_request_body(r)) != OK) {
  -        return errstatus;
  -    } else if (r->method_number != M_GET) {
  +    
  +    if (r->method_number != M_GET && r->method_number != M_POST) {
           return HTTP_METHOD_NOT_ALLOWED;
       }
   	
  
  
  

Mime
View raw message