httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_request.c
Date Fri, 11 Aug 2000 16:31:05 GMT
coar        00/08/11 09:31:04

  Modified:    src/main http_request.c
  Log:
  	Don't skip any remaining methods just because one was already
  	noted.
  
  Submitted by:	Joe Orton <joe@orton.demon.co.uk>
  Reviewed by:	Ken Coar
  
  Revision  Changes    Path
  1.42      +8 -3      apache-2.0/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -u -r1.41 -r1.42
  --- http_request.c	2000/08/11 14:41:13	1.41
  +++ http_request.c	2000/08/11 16:31:02	1.42
  @@ -1463,6 +1463,7 @@
   	 */
   	if (mnum == M_INVALID) {
   	    int i;
  +	    int found;
   	    char **xmethods;
   
   	    if (r->allowed_xmethods == NULL) {
  @@ -1473,13 +1474,17 @@
   	     * Don't add it to the array if it's already listed.
   	     */
   	    xmethods = (char **) r->allowed_xmethods->elts;
  +	    found = 0;
   	    for (i = 0; i < r->allowed_xmethods->nelts; ++i) {
   		if (strcmp(method, xmethods[i]) == 0) {
  -		    return;
  +		    found++;
  +		    break;
   		}
   	    }
  -	    xmethod = (const char **) apr_push_array(r->allowed_xmethods);
  -	    *xmethod = method;
  +	    if (!found) {
  +		xmethod = (const char **) apr_push_array(r->allowed_xmethods);
  +		*xmethod = method;
  +	    }
   	}
       }
   }
  
  
  

Mime
View raw message