Skip to content

Commit ae493b5

Browse files
committed
http-party#499 - Cannot read property protocol of undefined
1 parent 86750c7 commit ae493b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/http-proxy/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function createRightProxy(type) {
7373
* refer to the connection socket
7474
* pass(req, socket, options, head)
7575
*/
76-
if(passes[i](req, res, cbl ? false : this, head, cbl)) { // passes can return a truthy value to halt the loop
76+
if(passes[i](req, res, cbl ? false : {emit:this.emit.bind(this), options:options}, head, cbl)) { // passes can return a truthy value to halt the loop
7777
break;
7878
}
7979
}

0 commit comments

Comments
 (0)