30 Commits

Author SHA1 Message Date
Gustav Tiger
bab02e909e Include websocket non-upgrade response
When the server do not accept the upgrade request for websockets the
server's response was previously not included and sent back. Now the
proxy will include the response in these cases. Fixes #890.
2018-04-20 11:35:07 -04:00
François Leurent
220f5fb795 Expose full callback names 2016-10-22 11:45:16 -04:00
François Leurent
d48f67eb90 Do not rely on func.name (no scope) 2016-10-22 11:45:16 -04:00
Laurent Brucher
9752652e76 fixes after PR review 2015-10-22 18:38:58 +02:00
Laurent Brucher
a05fc2d169 Provide a "proxyReq" event also for websocket connections. 2015-10-22 15:56:34 +02:00
Jarrett Cruger
cea0e8676b [fix] make more functional 2015-08-30 17:28:05 -04:00
Arttu Liimola
3d2350c54f Replaced Object.keys().map with for in loop. 2015-08-30 17:16:42 -04:00
Arttu Liimola
da674ec4df Modify the set-cookie header fix to work with node 0.10.x. 2015-08-30 17:16:07 -04:00
Arttu Liimola
8bfd90c4d9 Use raw headers instead parsed.
Set-Cookie headers are parsed into single header with cookies in array.
This messes up the Set-Cookie headers, because browser receives multiple Set-Cookie headers as single with cookies separted with comma.
2015-08-30 17:15:54 -04:00
Jeremy Judeaux
5f14bcaa70 fix protocol and default port detection on node 0.12.x, compatible with 0.10.x 2015-04-02 14:23:58 +02:00
Jorge Leal
c62610e8e4 Deprecated proxySocket event in favor to open event.
Maintained both proxySocket and open for backward compatibility.

Conflicts:
	test/lib-http-proxy-test.js
2014-12-17 00:52:19 -07:00
Jorge
26537866b3 [api] add close event in ws-incoming.js 2014-12-17 00:51:06 -07:00
Jarrett Cruger
c04485671a [fix] use simple regex instead of indexOf to check the protocol to support without the colon fixes #711 2014-12-08 23:04:23 -05:00
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
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
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
d0862aff0c [fix] merge #495, thanks @glasser 2013-11-07 19:13:09 +01:00
cronopio
02df9a33c5 [fix] fix the correct order of arguments in ws-incoming passes 2013-10-21 23:22:32 -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
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
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