-
Notifications
You must be signed in to change notification settings - Fork 7.3k
HTTP parse error with amazon.com HPE_INVALID_CONSTANT with test case. #5479
Comments
The reason the parse error occurs is because the "Connection" header is spelled "Cneonction" in the response. You can see this with: |
@mscdex that's a pretty common practice: http://www.nextthing.org/archives/2005/08/07/fun-with-http-headers |
No, thats not the reason. Headers can be anything you want then to be. Amazon is sensitive to user agents. So its hard to reproduce in curl, its a problem with the chunked encoding it appears from my tracing with gdb through http_parser_execute. I'd suggest wireshark to see whats being returned over the socket. |
It appears amazon is returning two zero length chunks at the end of the request. The parser is setting the error on line 717 of http_parser.c in 0.10.5. ch is set to '0'. |
What @rustyconover said, the error is on Amazon's side. Closing, not our bug. |
Sorry to come back with this issue but: Thank you, |
I support the point from @karli2000 . |
There was a fix produced: It was marked as not needed, feel free to fork node and apply as necessary for your work. Rusty |
This test script errors out with a simple request to amazon.com. The number of bytes parsed varies. It seems to be a bug in HTTPParser.
The text was updated successfully, but these errors were encountered: