]> granicus.if.org Git - apache/commitdiff
After eliminating unusual whitespace in Unsafe mode (e.g. \f \v), we are left
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 7 Dec 2016 23:38:47 +0000 (23:38 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 7 Dec 2016 23:38:47 +0000 (23:38 +0000)
with the same behavior in both of these cases. Simplify. Noted by rpluem.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1773162 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_filters.c

index 85cae017b00ab5138a88b0e9a931459e494bb8db..ce922ff8f4dd9de7c8fc6dbed9bd8fb9cf9d4589 100644 (file)
@@ -660,17 +660,7 @@ static int check_header(void *arg, const char *name, const char *val)
         return 0;
     }
 
-    if (ctx->strict) { 
-        test = ap_scan_http_field_content(val);
-    }
-    else {
-        /* Simply terminate scanning on a CTL char, allowing whitespace */
-        test = val;
-        do {
-            while (*test == ' ' || *test == '\t') test++;
-            test = ap_scan_vchar_obstext(test);
-        } while (*test == ' ' || *test == '\t');
-    }
+    test = ap_scan_http_field_content(val);
     if (*test) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(02430)
                       "Response header '%s' value of '%s' contains invalid "