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 14:41:13 GMT
coar        00/08/11 07:41:13

  Modified:    src/main http_request.c
  Log:
  	Fix another oversight: don't add an extension method to the Allow
  	list if it's already there.
  
  Revision  Changes    Path
  1.41      +12 -0     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.40
  retrieving revision 1.41
  diff -u -u -r1.40 -r1.41
  --- http_request.c	2000/08/10 11:22:57	1.40
  +++ http_request.c	2000/08/11 14:41:13	1.41
  @@ -1462,9 +1462,21 @@
   	 * additional check of this array if it *is* invalid.
   	 */
   	if (mnum == M_INVALID) {
  +	    int i;
  +	    char **xmethods;
  +
   	    if (r->allowed_xmethods == NULL) {
   		r->allowed_xmethods = apr_make_array(r->pool, 2,
   						     sizeof(char *));
  +	    }
  +	    /*
  +	     * Don't add it to the array if it's already listed.
  +	     */
  +	    xmethods = (char **) r->allowed_xmethods->elts;
  +	    for (i = 0; i < r->allowed_xmethods->nelts; ++i) {
  +		if (strcmp(method, xmethods[i]) == 0) {
  +		    return;
  +		}
   	    }
   	    xmethod = (const char **) apr_push_array(r->allowed_xmethods);
   	    *xmethod = method;
  
  
  

Mime
View raw message