37 Commits

Author SHA1 Message Date
MinRK
c62766391e close socket if upstream request fails
adds socket.end() to on('error') handlers for proxyReq and proxySocket
2014-09-30 19:58:57 -07:00
MinRK
bcd8a564a8 close websocket if proxyReq is closed before upgrade
avoids leaving client sockets open when upstream
connections are rejected.
2014-09-30 17:01:20 -07:00
Jarrett Cruger
10a294af4d [fix] do a check to make sure the server exists before we try and emit 2014-09-30 15:22:52 -04:00
Thorsten Lorenz
000eb533de emitting proxySocket on proxyServer
- emitted once proxySocket was created and socket was piped into it
- needed to support sniffing messages coming from proxy target
2014-09-29 20:09:46 -04:00
Manu Sporny
db5f2954b2 [api] Add event-based ability to modify pre-flight proxy requests. 2014-07-18 11:46:04 -04:00
Jarrett Cruger
d1baa3684e [api] also emit the target on a proxy error 2014-07-08 16:12:57 -04:00
Damian Kaczmarek
7b79a7409a Change name targetTimeout to proxyTimeout 2014-06-10 19:04:12 +02:00
Damian Kaczmarek
0f243516e1 Added targetTimeout option and two tests for timeout 2014-06-10 01:35:53 +02:00
Bryce Gibson
1213e46b1b Add the req and res objects to the proxyRes event 2014-05-12 08:22:54 +10:00
Jarrett Cruger
77a1cff9bc [fix] handle error on incoming request as well and properly abort proxy if client request is aborted 2014-04-14 13:08:10 -04:00
Jarrett Cruger
4f07dc220d [fix] let user make the decision on what to do with the buffer 2014-04-10 20:02:46 -04:00
Jarrett Cruger
8b48a9fdab [api] emit a start an an end event 2014-04-09 13:38:13 -04:00
David Glasser
4c3ba74c4e Close outgoing ws if incoming ws emits error
Fixes #559, which contains a full reproduction recipe.
2014-01-28 13:58:09 -05:00
David Glasser
0b223abb65 Fix argument order for ws stream pass
head and error handling was broken before this commit.
2014-01-22 15:28:23 -08:00
yawnt
e936d186b6 [fix] closes #555 2014-01-19 11:49:26 +01:00
Mike Moulton
969a623542 Only emit response if a valid server is present 2014-01-14 00:45:42 -07:00
yawnt
97e4600e94 [fix] fixes #341 2013-12-18 12:33:23 +01:00
yawnt
10c0f11b68 [fix] remove duplicate 2013-11-19 20:05:46 +01:00
Ben Firshman
cb7af4f4d7 Fix websocket error handing
Websockets have sockets, not responses.
2013-11-18 23:06:56 +00:00
yawnt
961d2f9400 [fix] support target and forward 2013-11-08 20:56:26 +01:00
yawnt
d0862aff0c [fix] merge #495, thanks @glasser 2013-11-07 19:13:09 +01:00
yawnt
590bb604da [fix] _ because it is unused 2013-11-07 19:00:01 +01:00
yawnt
dda6f7a45a [feature] add emit proxyRes 2013-11-05 17:44:04 +01:00
yawnt
1204a35e46 [fix] support buffer 2013-10-29 18:12:23 +01:00
yawnt
e3f8d5fdbe [feature] add buffer support 2013-10-26 17:20:30 +02:00
cronopio
02df9a33c5 [fix] fix the correct order of arguments in ws-incoming passes 2013-10-21 23:22:32 -05:00
cronopio
cc09ae6a34 [fix] use the correct arguments order 2013-10-21 21:19:52 -05:00
mmoulton
0bfb9be418 Fixed issue where error callback would not invoke, including new test cases. Added req/res values to error events.
Conflicts:
	lib/http-proxy/passes/web-incoming.js
2013-10-21 17:36:20 -05:00
cronopio
5e130de854 Revert "[fix] fixed passes functions, now 'this' can be used and options are stored on 'this.options'"
This reverts commit 9b3e1eb247df29d18ea299ff4ebb2f10eeb71269.
2013-10-21 14:49:39 -05:00
cronopio
babdf531fe Revert "[fix] fixed options and server reference to can access them from passes functions"
This reverts commit 90fb01d38ac5af7ef395547b24e985b6f63b4abc.
2013-10-21 14:45:03 -05:00
cronopio
2bf20d61d5 Revert "[tests] fix test to use the new way to pass options"
This reverts commit 52ecd52ee5aa78603e44ba8d5ff9187410351622.
2013-10-21 14:44:49 -05:00
cronopio
52ecd52ee5 [tests] fix test to use the new way to pass options 2013-10-21 03:59:14 -05:00
cronopio
9b3e1eb247 [fix] fixed passes functions, now 'this' can be used and options are stored on 'this.options' 2013-10-21 03:46:30 -05:00
cronopio
90fb01d38a [fix] fixed options and server reference to can access them from passes functions 2013-10-21 03:26:54 -05:00
yawnt
c7924e01f9 [fix] callback as optional error handler 2013-10-09 17:23:44 +02:00
yawnt
601dbcbfe9 [fix] refactor error handling 2013-10-09 16:59:03 +02:00
indexzero
bb0d28c587 [refactor minor] s/caronte/http-proxy/ or s/caronte/httpProxy/ where appropriate. 2013-09-26 03:37:08 -04:00