Branch: Tag:

2016-07-27

2016-07-27 15:07:35 by Martin Nilsson <nilsson@fastmail.com>

Header folding is prohibited in normal HTTP according to RFC 7230 section 3.2.4. Added another create() parameter to control this. The API is getting a bid ugly to maintain backwards compatibility. It's not unreasonable to change the default behaviour to comply with the standard.

130:   ]], [[ ({ "", "GET / HTTP/1.0", ([ "Blaha":"foo", "blaha":"foo"]) }) ]])      test_any_equal([[ +  object hp = _Roxen.HeaderParser(0, 0, 1); +  return hp->feed( "GET / HTTP/1.0\r\nblaha: foo\r\n bar\r\nx:1\r\n\t2\r\n\r\n" ); + ]], [[ ({ "", "GET / HTTP/1.0", ([ "blaha":"foo", "x":"1"]) }) ]]) +  + test_any_equal([[    object hp = _Roxen.HeaderParser();    return hp->feed( "GET / HTTP/1.0\r\nA\r\nblaha: foo\r\n\r\n" );   ]], [[ ({ "", "GET / HTTP/1.0", (["blaha":"foo"]) }) ]])