41a6c3
--- a/modules/dav/main/util.c	2014/01/09 14:28:39	1556815
41a6c3
+++ b/modules/dav/main/util.c	2014/01/09 14:29:47	1556816
41a6c3
@@ -396,8 +396,10 @@
41a6c3
 
41a6c3
     if (strip_white) {
41a6c3
         /* trim leading whitespace */
41a6c3
-        while (apr_isspace(*cdata))     /* assume: return false for '\0' */
41a6c3
+        while (apr_isspace(*cdata)) {     /* assume: return false for '\0' */
41a6c3
             ++cdata;
41a6c3
+            --len;
41a6c3
+        }
41a6c3
 
41a6c3
         /* trim trailing whitespace */
41a6c3
         while (len-- > 0 && apr_isspace(cdata[len]))