]> git.ipfire.org Git - thirdparty/squid.git/commit
HTTP/1.1: unfold mime header blocks
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 20 May 2016 08:28:33 +0000 (20:28 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 20 May 2016 08:28:33 +0000 (20:28 +1200)
commit00237269110b6d9661457a7f8baa4c6450ded737
treef76f1b1be24405e3bd740e6dbd42da5f29af7ae5
parent8798e209833f31da6f3f411e8d3cae4c879c478d
HTTP/1.1: unfold mime header blocks

Enact the RFC 7230 section 3 requirement that proxies remove obs-fold from
received mime header blocks and drop all lines that start with whitespace
immediately following the request-line.

Also;

* Shuffle the DelimiterCharacters() and RelaxedDelimiters() helper methods
  to Http::One::Parser for use in processing mime.

* Extend the headersEnd() function with a wrapper to avoid SBuf::c_str()
  and to efficiently report whether obs-fold exists without needing to
  re-scan the block.

* Document the mime_header.h API function(s).

* Add Http::One::CrLf() to present a SBuf CRLF constant. This can be used
  instead of the many local string definitions we have now.
  The implementation could perhapse be done better for performance, but not
  done here.
src/http/one/Parser.cc
src/http/one/Parser.h
src/http/one/RequestParser.cc
src/http/one/RequestParser.h
src/http/one/forward.h
src/mime_header.cc
src/mime_header.h
src/tests/stub_mime.cc