httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1540728 - in /httpd/httpd/branches/2.2.x: ./ STATUS modules/dav/main/mod_dav.c modules/dav/main/mod_dav.h modules/dav/main/util.c
Date Mon, 11 Nov 2013 14:01:24 GMT
Author: jim
Date: Mon Nov 11 14:01:23 2013
New Revision: 1540728

URL: http://svn.apache.org/r1540728
Log:
Merge r1528718 from trunk:

mod_dav: Fix PR 55306.

Makes mod_dav no longer require that the lock token be provided when the
source of a COPY is locked.  The prior behavior was in violating of
RFC 4918 which says that the lock token is only required on resources
that may be modified by the method.

* modules/dav/main/mod_dav.h
  (DAV_VALIDATE_NO_MODIFY): New flag to be passed to dav_validate_* functions.

* modules/dav/main/mod_dav.c
  (dav_method_copymove): Use the new flag when calling dav_validate_request()
    on the COPY source.

* modules/dav/main/util.c
  (dav_validate_resource_state): Use the flag to decide to ignore if the lock
    token is not provided.

Submitted by: breser
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.2.x/   (props changed)
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c
    httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h
    httpd/httpd/branches/2.2.x/modules/dav/main/util.c

Propchange: httpd/httpd/branches/2.2.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1528718

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1540728&r1=1540727&r2=1540728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Mon Nov 11 14:01:23 2013
@@ -97,20 +97,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
   
-  * mod_ssl: Support ECC keys
-    trunk patch: http://svn.apache.org/r834378 
-                 http://svn.apache.org/r835046
-                 http://svn.apache.org/r1040304
-                 http://svn.apache.org/r1040373
-                 http://svn.apache.org/r1090645
-                 http://svn.apache.org/r1294306
-                 http://svn.apache.org/r1509872
-    2.4.x patch: first five from above, plus
-                 http://svn.apache.org/r1308862
-                 http://svn.apache.org/r1509875
-    2.2.x patch: http://people.apache.org/~sf/ECC-2.2-v2.diff
-    +1: sf, trawick, wrowe
-
   * mod_ssl config: Fix range check bug with SSLRenegBufferSize
     trunk patch: http://svn.apache.org/r954641
                  (only this part, which has the only non-style fix applicable to 2.2.x:
@@ -119,11 +105,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     2.2.x patch: trunk patch to ssl_engine_config.c (above) applies with offset
     +1: trawick, jorton, wrowe
 
-  * mod_dav: Fix 55306.  Don't require lock tokens for COPY source.
-    trunk patches: https://svn.apache.org/r1528718
-    2.2.x: trunk works, CHANGES needs to be written when merging
-    +1: breser, minfrin, wrowe
-
   * mod_dav: Fix 55397.  dav_resource->uri treated as unencoded. This was an
     unnecessary ABI changed introduced in 2.2.25
     trunk patches: https://svn.apache.org/r1529559

Modified: httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c?rev=1540728&r1=1540727&r2=1540728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c Mon Nov 11 14:01:23 2013
@@ -2734,7 +2734,8 @@ static int dav_method_copymove(request_r
     if ((err = dav_validate_request(r, resource, depth, NULL,
                                     &multi_response,
                                     (is_move ? DAV_VALIDATE_PARENT
-                                             : DAV_VALIDATE_RESOURCE)
+                                             : DAV_VALIDATE_RESOURCE
+                                               | DAV_VALIDATE_NO_MODIFY)
                                     | DAV_VALIDATE_USE_424,
                                     NULL)) != NULL) {
         err = dav_push_error(r->pool, err->status, 0,

Modified: httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h?rev=1540728&r1=1540727&r2=1540728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h Mon Nov 11 14:01:23 2013
@@ -1281,6 +1281,9 @@ DAV_DECLARE(dav_error *) dav_validate_re
                                            the 424 DAV:response */
 #define DAV_VALIDATE_USE_424    0x0080  /* return 424 status, not 207 */
 #define DAV_VALIDATE_IS_PARENT  0x0100  /* for internal use */
+#define DAV_VALIDATE_NO_MODIFY  0x0200  /* resource is not being modified
+                                           so allow even if lock token
+                                           is not provided */
 
 /* Lock-null related public lock functions */
 DAV_DECLARE(int) dav_get_resource_state(request_rec *r,

Modified: httpd/httpd/branches/2.2.x/modules/dav/main/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/dav/main/util.c?rev=1540728&r1=1540727&r2=1540728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/util.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/util.c Mon Nov 11 14:01:23 2013
@@ -929,13 +929,16 @@ static dav_error * dav_validate_resource
         /*
         ** For methods other than LOCK:
         **
-        ** If we have no locks, then <seen_locktoken> can be set to true --
+        ** If we have no locks or if the resource is not being modified
+        ** (per RFC 4918 the lock token is not required on resources
+        ** we are not changing), then <seen_locktoken> can be set to true --
         ** pretending that we've already met the requirement of seeing one
         ** of the resource's locks in the If: header.
         **
         ** Otherwise, it must be cleared and we'll look for one.
         */
-        seen_locktoken = (lock_list == NULL);
+        seen_locktoken = (lock_list == NULL
+                          || flags & DAV_VALIDATE_NO_MODIFY);
     }
 
     /*



Mime
View raw message