creationix/http-parser-js

statusCode not being populated

lllama opened this issue · 4 comments

I'm using the library along with nodejitsu's HTTP proxy (https://github.com/nodejitsu/node-http-proxy). There is an issue when proxying requests, as the statusCode is not being set on the response object. Swapping back to the C version of the parser stops the error being thrown. It looks like an HTTP request object is being recreated but its response does not have the statusCode or statusMessage fields populated.

Can you please provide more details? This would help reproducing & solving the issue.

  • What is the error message you see?
  • Which server do you want to proxy?
  • Can you provide your code for the proxy? (Is it just like this or more complicated?)
  • Could you provide wireshark logs?

http-parser always fills in statusCode & statusMessage when it successfully parses a response, so there must be some underlying cause.

Never received any details, assuming resolved or an external issue, feel free to open a new issue if this is still an issue and can be reproduced.

Doh! Apologies - looks like I missed your follow up all those years ago. Happy new year!

No worries! Just doing some new year's cleaning in this repo ^_^. Happy new year!