httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject cvs commit: httpd-2.0/modules/dav/main mod_dav.c util.c util_lock.c
Date Tue, 13 Mar 2001 02:13:57 GMT
gstein      01/03/12 18:13:56

  Modified:    modules/dav/main mod_dav.c util.c util_lock.c
  Log:
  *) mod_dav.c: allow PUT to a WORKING resource (this actually the only valid
     place to do a PUT(!))
  
  *) util.c: add a comment. allow validation to proceed without a lock
     database (the rest of the code supported it; one erroneous check disabled
     that work)
  
  *) util_lock.c: allow dav_unlock() to be a no-op when a lock provide isn't
     present; this allows DELETE to work.
  
  Revision  Changes    Path
  1.51      +2 -1      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.50
  retrieving revision 1.51
  diff -u -u -r1.50 -r1.51
  --- mod_dav.c	2001/02/28 15:24:03	1.50
  +++ mod_dav.c	2001/03/13 02:13:54	1.51
  @@ -965,7 +965,8 @@
           return dav_handle_err(r, err, NULL);
   
       /* If not a file or collection resource, PUT not allowed */
  -    if (resource->type != DAV_RESOURCE_TYPE_REGULAR) {
  +    if (resource->type != DAV_RESOURCE_TYPE_REGULAR
  +        && resource->type != DAV_RESOURCE_TYPE_WORKING) {
           body = apr_psprintf(r->pool,
                              "Cannot create resource %s with PUT.",
                              ap_escape_html(r->pool, r->uri));
  
  
  
  1.23      +3 -5      httpd-2.0/modules/dav/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/util.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -u -r1.22 -r1.23
  --- util.c	2001/02/24 21:27:29	1.22
  +++ util.c	2001/03/13 02:13:54	1.23
  @@ -1149,6 +1149,9 @@
   	    ** We may have aborted the scan before seeing the locktoken.
   	    ** Rescan the If: header to see if we can find the locktoken
   	    ** somewhere.
  +            **
  +            ** Note that seen_locktoken == 0 implies lock_list != NULL
  +            ** which implies locks_hooks != NULL.
   	    */
   	    if (dav_find_submitted_locktoken(if_header, lock_list,
   					     locks_hooks)) {
  @@ -1363,11 +1366,6 @@
   	        return err;
               }
               lock_db_opened_locally = 1;
  -        }
  -        else {
  -            return dav_new_error(r->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
  -				 "Resource validation failed because no "
  -				 "lock hooks were found.");
           }
       }
   
  
  
  
  1.15      +2 -3      httpd-2.0/modules/dav/main/util_lock.c
  
  Index: util_lock.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/util_lock.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -u -r1.14 -r1.15
  --- util_lock.c	2001/02/16 04:26:36	1.14
  +++ util_lock.c	2001/03/13 02:13:55	1.15
  @@ -523,10 +523,9 @@
       const dav_hooks_repository *repos_hooks = resource->hooks;
       dav_error *err;
   
  -    /* If no locks provider, we shouldn't have been called */
  +    /* If no locks provider, then there is nothing to unlock. */
       if (hooks == NULL) {
  -	/* ### map result to something nice; log an error */
  -	return HTTP_INTERNAL_SERVER_ERROR;
  +        return OK;
       }
   
       /* 2518 requires the entire lock to be removed if resource/locktoken
  
  
  

Mime
View raw message