Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching a callback to a proxy request fails always #548

Closed
cheddar opened this issue Jan 13, 2014 · 1 comment
Closed

Attaching a callback to a proxy request fails always #548

cheddar opened this issue Jan 13, 2014 · 1 comment

Comments

@cheddar
Copy link

cheddar commented Jan 13, 2014

On branch caronte, if you attach a callback to your proxy request, then web-incoming's stream() method gets called with false as the value of the server object. This causes it to fail to actually emit the "proxyRes" event, which results in everything breaking.

This is an example stack trace:

TypeError: Object false has no method 'emit'
    at ClientRequest.<anonymous> (/http-proxy/lib/http-proxy/passes/web-incoming.js:120:14)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
    at Socket.socketOnData [as ondata] (http.js:1583:20)
    at TCP.onread (net.js:525:27)
cheddar added a commit to tidepool-org/node-http-proxy that referenced this issue Jan 13, 2014
@yawnt
Copy link
Contributor

yawnt commented Jan 14, 2014

fixed in #549, thanks for reporting

@yawnt yawnt closed this as completed Jan 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants