indexzero
2d42709c32
[fix] Optimize fix for x-forwarded-for-port.
2013-12-26 23:59:48 -08:00
blahed
d4e91ebc33
determine x-forwarded-port from host header
...
`req.remotePort' returns the ephemeral port, which is not useful.
node v0.10.0 added `req.localPort' which returns what we want, but
we want to maintain backwards compatibility. Fixes #341 & #227
2013-12-26 23:52:05 -08:00
indexzero
7e8041d2b6
[dist minor] 2 space indents next time @samalba
2013-12-26 23:50:19 -08:00
Sam Alba
8332e74420
Prevent headers to be sent twice
2013-12-26 23:48:06 -08:00
Phil Jackson
7c8ecc8ea8
Put the arguments the right way around in emitter.
2013-12-26 23:39:44 -08:00
Phil Jackson
bc12ca3939
Emit middlewareError when on middleware error.
...
Now it's possible to pass an Error object to next() and have it handled
in a custom way that's suitable to your application.
2013-12-26 23:39:37 -08:00
Jan Jongboom
781c038f2b
Fix for #458 . Host header may cause some sites not to be proxyable with changeOrigin enabled
2013-12-26 23:35:47 -08:00
yawnt
36389384cb
Merge pull request #416 from MiLk/req-path
...
Send path in req.path and not the url
2013-12-18 03:49:59 -08:00
Maciej Małecki
e1d384e769
[fix] Respect maxSockets from target options in RoutingProxy
2013-06-20 15:28:47 +02:00
Emilien Kenler
0c753234c0
Send path in req.path and not the url
...
Signed-off-by: Emilien Kenler <hello@emilienkenler.com>
2013-05-04 22:48:50 +02:00
indexzero
7fc39d77f4
[minor] Strip trailing whitespace.
2013-04-21 17:02:18 -04:00
indexzero
59b71c033f
[minor] Style compliance. Fixes #402 .
2013-04-21 17:01:20 -04:00
Ivan Jaramillo
985025c90f
Add headers on 'handshake'
...
The headers in the 'handshake' event were not written to the socket, the client received data but not the headers.
2013-04-21 16:59:08 -04:00
Nick Muerdter
a29b5e8e28
Correct keep-alive responses to HTTP 1.0 clients.
...
Since the proxy requests comes from NodeJS's HTTP 1.1 request client, a
backend server may default to setting Connection: keep-alive in its
response. However, the real HTTP 1.0 client may not be able to
handle that.
Force HTTP 1.0 client's to Connection: close, unless the client
explicitly supports keep-alive.
2013-04-18 16:33:10 -06:00
Charlie Robbins
3763dc935f
Merge pull request #370 from jmatthewsr-ms/master
...
Fix for slab buffer retention, leading to large memory consumption
2013-04-09 11:02:56 -07:00
Charlie Robbins
4335f49b0e
Merge pull request #385 from nodejitsu/breaking-proxy-response
...
Change the emitter of the `proxyResponse` event
2013-03-17 22:51:50 -07:00
indexzero
2620f06e2d
[fix breaking] Emit the proxyResponse event on the HttpProxy instance to reduce listener churn and reference counts.
2013-03-18 01:49:01 -04:00
thefosk
c9b6895c5e
Fixing the if statement as it lead to 'TypeError: Parameter 'url' must be a string, not undefined' in certain cases
2013-03-14 19:09:03 -07:00
indexzero
c78356e9cf
[breaking] Ensure that webSocketProxyError also receives the error to be consistent with proxyError events.
2013-03-09 05:08:55 -05:00
indexzero
ea0587a8f9
[minor] Small whitespace compliance.
2013-03-09 04:42:07 -05:00
indexzero
5d515e4728
[api test] Manually merge #195 from @tglines since that fork was deleted. Update tests to use new macros. Fixes #195 . Fixes #60 .
2013-03-09 04:20:05 -05:00
Mikkel Garcia
5e6be6ccf5
[doc] added comments to pathnameOnly block.
2013-03-09 03:18:15 -05:00
Mikkel Garcia
46b078a98d
pathnameOnly flag added. Ignores hostname and applies routing table to the paths being requested.
2013-03-09 03:18:07 -05:00
pdoran
89d43c20dd
Added timeout option and test to test new timeout parameter, added requestFail assertion.
2013-03-09 03:04:29 -05:00
indexzero
476cbe741f
[minor] Move private helper to end of file.
2013-03-09 02:44:46 -05:00
indexzero
9be0af3166
[fix] Set "content-length" header to "0" if it is not already set on DELETE requests. Fixes #338 .
2013-03-09 02:44:28 -05:00
indexzero
a89e2f2688
[fix] Do not use "Transfer-Encoding: chunked" header for proxied DELETE requests with no "Content-Length" header. Fixes #373 .
2013-03-09 02:40:09 -05:00
indexzero
6a278b3dd8
[fix] http-proxy should not modify the protocol in redirect request for external sites. Fixes #359 .
2013-03-09 02:35:50 -05:00
indexzero
3130665d9f
[fix] Emit notFound event when ProxyTable location does not exist. Fixes #355 . Fixes #333 .
2013-03-09 02:29:58 -05:00
indexzero
4c1a2c1416
[fix] Make options immutable in RoutingProxy. Fixes #248 .
2013-03-09 02:21:31 -05:00
colinmollenhour
b1c4bd61e8
Remove data event that is not needed after-all.
2013-03-09 01:48:42 -05:00
Colin Mollenhour
3b86a7aae3
Add 'proxyResponse' event so observer can modify response headers or abort response.
2013-03-09 01:48:37 -05:00
Colin Mollenhour
4c130f5dac
Allow event observers to access upstream response headers and data.
2013-03-09 01:48:29 -05:00
indexzero
9cecd97153
[minor] s/function(/function (/ s/){/) {/
2013-03-09 01:43:25 -05:00
jpetazzo
ba65a485fc
Fix typo which slipped in during patch clean-up
2013-03-09 01:21:30 -05:00
jpetazzo
ef66833c4d
Fix truncated chunked responses
2013-03-09 01:21:21 -05:00
Charlie Robbins
af9eb06e47
Merge pull request #298 from Kami/connection_keep_alive_on_1_1
...
If HTTP 1.1 is used and backend doesn't return 'Connection' header, expicitly return Connection: keep-alive.
2013-03-08 22:11:37 -08:00
indexzero
28a3b0a6f0
[fix] Remove special case handling of 304 responses since it was fixed in 182dcd3. Fixes #322 .
2013-03-09 01:10:02 -05:00
Yosef Dinerstein
ffe74ed299
- support unix donain sockets and windows named pipes (socketPath) on node 0.8.x. On node 0.6.x the support was opaque via port, but on the new node, socketPath should be set explicitely.
...
- avoid adding multiple headers with the same name
- fix bug in setting connection
2013-03-09 01:05:22 -05:00
indexzero
c6da760ca9
Revert "[fix minor] Prevent crashes from attempting to remove listeners more than once when proxying websocket requests."
...
This reverts commit a681493371ae63f026e869bf58b6fea682dc5de3.
2013-03-09 00:43:25 -05:00
indexzero
a681493371
[fix minor] Prevent crashes from attempting to remove listeners more than once when proxying websocket requests.
2013-03-09 00:40:00 -05:00
unknown
2055d0c8ec
memory leak fix in closing of the scokets
2013-03-09 00:36:19 -05:00
indexzero
013cb2e0c2
[fix] Ensure response.headers.location is defined. Fixes #276 .
2013-03-09 00:28:50 -05:00
Otávio Ribeiro
9672b99271
cleanning
2013-03-09 00:20:46 -05:00
Otávio Ribeiro
8d8739999f
cleanning
2013-03-09 00:20:42 -05:00
Otávio Ribeiro
31fc94aa5e
working on x-forwarded-for
2013-03-09 00:20:38 -05:00
Otávio Ribeiro
133240937d
working on x-forwarded-for
2013-03-09 00:20:33 -05:00
Otávio Ribeiro
916d44e3d2
Routing Proxy was not sending x-forward-*. Fixing It...
2013-03-09 00:20:26 -05:00
Charlie Robbins
025adc2912
Merge pull request #365 from adjohnson916/master
...
routing proxy 'this' reference bug?
2013-03-08 21:14:14 -08:00
Giannis Dzegoutanis
3b84e27ab4
remove offending code, final fix for issue #364
2013-02-12 20:43:22 +01:00