]> granicus.if.org Git - apache/commitdiff
http: follow up to r1777460.
authorYann Ylavic <ylavic@apache.org>
Fri, 6 Jan 2017 18:04:31 +0000 (18:04 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 6 Jan 2017 18:04:31 +0000 (18:04 +0000)
We MUST unfold outgoing HTTP headers in any case, "message/http" is for
inner content.

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

modules/http/http_filters.c

index 8ab022af2624aed37d3e2feae948aec413d72f3b..5fa768e25b5a439b43ce4e7fa3f96ff15f96dba4 100644 (file)
@@ -631,8 +631,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
 
 struct check_header_ctx {
     request_rec *r;
-    unsigned int strict:1,
-                 unfold:1;
+    int strict;
 };
 
 /* check a single header, to be used with apr_table_do() */
@@ -673,10 +672,7 @@ static int check_header(struct check_header_ctx *ctx,
                               name, pos);
                 return 0;
             }
-            if (!ctx->unfold) {
-                end += 3;
-            }
-            else if (!dst) {
+            if (!dst) {
                 *val = dst = apr_palloc(ctx->r->pool, strlen(*val) + 1);
             }
         }
@@ -726,8 +722,6 @@ static APR_INLINE int check_headers(request_rec *r)
 
     ctx.r = r;
     ctx.strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
-    ctx.unfold = (!r->content_type || strncmp(r->content_type,
-                                              "message/http", 12));
     return check_headers_table(r->headers_out, &ctx) &&
            check_headers_table(r->err_headers_out, &ctx);
 }