httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/modules/dav/main mod_dav.c
Date Mon, 30 Sep 2002 05:10:07 GMT
rbb         2002/09/29 22:10:07

  Modified:    .        CHANGES
               modules/dav/main mod_dav.c
  Log:
  Allow CGI scripts that use POST and mod_dav to exist in the same location.
  
  Mod_Dav was always setting the r->handler field to "dav_handler", but
  this means that mod_cgi won't run the script.  According to my reading
  of the DAV RFC, mod_dav shouldn't do anything at all with a POST request,
  because it is impossible to know if the POST was meant for DAV or for some
  other resource.  We used to excuse POST from DAV processing, so I have
  re-enabled that behavior.
  
  PR:	13025
  
  Revision  Changes    Path
  1.942     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.941
  retrieving revision 1.942
  diff -u -r1.941 -r1.942
  --- CHANGES	28 Sep 2002 06:10:46 -0000	1.941
  +++ CHANGES	30 Sep 2002 05:10:06 -0000	1.942
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.43
   
  +  *) Allow POST requests and CGI scripts to work when DAV is enabled
  +     on the location.  [Ryan Bloom]
  +
     *) Allow the UserDir directive to accept a list of directories.
        This matches what Apache 1.3 does.  Also add documentation for
        this feature. [Jay Ball <jay@veggiespam.com>]
  
  
  
  1.90      +13 -3     httpd-2.0/modules/dav/main/mod_dav.c
  
  Index: mod_dav.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- mod_dav.c	19 Sep 2002 02:36:08 -0000	1.89
  +++ mod_dav.c	30 Sep 2002 05:10:07 -0000	1.90
  @@ -4633,10 +4633,20 @@
           }
       }
   
  -    /* We are going to be handling the response for this resource. */
  -    r->handler = DAV_HANDLER_NAME;
  +    /* ### this is wrong.  We should only be setting the r->handler for the
  +     * requests that mod_dav knows about.  If we set the handler for M_POST
  +     * requests, then CGI scripts that use POST will return the source for the
  +     * script.  However, mod_dav DOES handle POST, so something else needs 
  +     * to be fixed.
  +     */
  +    if (r->method_number != M_POST) {
   
  -    return OK;
  +        /* We are going to be handling the response for this resource. */
  +        r->handler = DAV_HANDLER_NAME;
  +        return OK;
  +    }
  +
  +    return DECLINED;
   }
   
   static void register_hooks(apr_pool_t *p)
  
  
  

Mime
View raw message