tinyhttp icon indicating copy to clipboard operation
tinyhttp copied to clipboard

Headers without value can't be parsed

Open henrikjonhed opened this issue 8 years ago • 2 comments

A header that does not have a value, but a carriage return directly after the colon will put the parser in state http_roundtripper_error. I guess that the webserver that returns this kind of header is the one to blame, but it would be nice to be able to receive data from it anyway. screenshot 2017-02-03 12 44 48

henrikjonhed avatar Feb 07 '17 13:02 henrikjonhed

I actually thing that the fix should be

-    0x87,    6, 0xC1, 0xC1,    6, 0x87, 0x87, 0xC1, /* state 6: leading whitespace before header value */
+    0x87,    6, 0xC4,   10,    6, 0x87, 0x87, 0xC1, /* state 6: leading whitespace before header value */

ledbit avatar Apr 24 '17 05:04 ledbit

Hi @ledbit, Do you mean 0x10?

RalphCorderoy avatar Jun 08 '20 09:06 RalphCorderoy