From: William A. Rowe Jr Date: Thu, 4 Aug 2016 21:43:01 +0000 (+0000) Subject: Strictly observe the one-SP requirement of every obs-fold line. X-Git-Tag: 2.5.0-alpha~1327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b45b9ff116701b07d0b242819435b4c5dad2e4ba;p=thirdparty%2Fapache%2Fhttpd.git Strictly observe the one-SP requirement of every obs-fold line. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1755236 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index 2221b1f9a83..e65b062e5e2 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -858,15 +858,12 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb return; } - /* An empty obs-fold line can simply be ignored... */ - if (field[1] == '\0') { - continue; - } - - /* ...and leading whitespace on an obs-fold line can be - * similarly discarded */ - while (field[1] == '\t' || field[1] == ' ') { - ++field; --len; + if (field[1] != '\0') { + /* ...and leading whitespace on an obs-fold line can be + * similarly discarded */ + while (field[1] == '\t' || field[1] == ' ') { + ++field; --len; + } } /* This line is a continuation of the preceding line(s),