httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1477530 - /httpd/httpd/trunk/modules/dav/main/util.c
Date Tue, 30 Apr 2013 10:15:23 GMT
Author: minfrin
Date: Tue Apr 30 10:15:23 2013
New Revision: 1477530

URL: http://svn.apache.org/r1477530
Log:
mod_dav: Make sure the URI length is calculated correctly.

Modified:
    httpd/httpd/trunk/modules/dav/main/util.c

Modified: httpd/httpd/trunk/modules/dav/main/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/util.c?rev=1477530&r1=1477529&r2=1477530&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/main/util.c (original)
+++ httpd/httpd/trunk/modules/dav/main/util.c Tue Apr 30 10:15:23 2013
@@ -659,9 +659,6 @@ static dav_error * dav_process_if_header
 
             /* clean up the URI a bit */
             ap_getparents(parsed_uri.path);
-            uri_len = strlen(parsed_uri.path);
-            if (uri_len > 1 && parsed_uri.path[uri_len - 1] == '/')
-                parsed_uri.path[--uri_len] = '\0';
 
             /* the resources we will compare to have unencoded paths */
             if (ap_unescape_url(parsed_uri.path) != OK) {
@@ -670,6 +667,11 @@ static dav_error * dav_process_if_header
                         "Invalid percent encoded URI in tagged If-header.");
             }
 
+            uri_len = strlen(parsed_uri.path);
+            if (uri_len > 1 && parsed_uri.path[uri_len - 1] == '/') {
+                parsed_uri.path[--uri_len] = '\0';
+            }
+
             uri = parsed_uri.path;
             list_type = tagged;
             break;



Mime
View raw message