crash in accessing res.connection.pair
Problem
Hi, I am using the latest http-proxy in hostNameOnly mode and it kept crashing in https://github.com/nodejitsu/node-http-proxy/blob/master/lib/node-http-proxy.js#L372 I dont' have the stack trace right now, but it said something like res.connection was undefined. . I just changed res to req in that line and everything started to work. I am very new to nodejs, so not sure what may be happening, but is this just a typo? I would think you would use the request object to set the header on the proxied request, so it does seem like one. Regards Qasim
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: crash in accessing res.connection.pair
@qzaidi The hostNameOnly was a contributed feature, so additional information about this issue (such as a stack trace or some sample code that reproduces the issue) would be quite helpful. What version of node, npm, and node-http-proxy are you currently using?
Trust Score
1 verification
- 1
@qzaidi The hostNameOnly was a contributed feature, so additional information ab
@qzaidi The hostNameOnly was a contributed feature, so additional information about this issue (such as a stack trace or some sample code that reproduces the issue) would be quite helpful.
- 2
What version of node, npm, and node-http-proxy are you currently using?
What version of node, npm, and node-http-proxy are you currently using?
Validation
Resolved in http-party/node-http-proxy GitHub issue #62. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep