Jorge Leal
8bff3ddc12
Added websocket close event test
2014-12-17 00:51:19 -07:00
Eugene Zhdan
c1a94176a8
Fix variables scope in test
2014-12-13 21:45:14 +03:00
Jarrett Cruger
89f9ca1e89
[test] show that we support protocol without the colon
2014-12-08 23:04:41 -05:00
Jarrett Cruger
71a06aab02
[test] add tests for the changeOrigin cases in properly setting the host header
2014-12-08 16:14:48 -05:00
Jarrett Cruger
410a8ce94c
[test] add proper failing test case for #738
2014-12-02 10:25:30 -07:00
Jarrett Cruger
d98d9516ea
[fix] simple fixes #748 #744 #746
2014-12-02 09:58:06 -07:00
koolc
70ed1c4273
[Bugfix] Allow for multiple ? in outgoing urls.
...
Without this fix urls that had multiple ? in them would drop sections
of the url since before there was an assumption of there only being one.
2014-12-01 12:34:16 -05:00
Jarrett Cruger
95a588706b
Merge pull request #741 from samccone/sjs/redirect-host-rewrite
...
Allow optional redirect host rewriting.
2014-11-25 17:08:54 -05:00
Mike Pennisi
8a24a1e18f
Set Content-Length header for OPTIONS requests
...
Web browsers automatically issue an OPTIONS request in advance of other
HTTP requests when the document's domain does not match the target in
order to facilitate Cross-Origin Resource Sharing. These requests are
forbidden from specifying a body and typically do not specify an
(unecessary) `Length` header.
Node.js automatically adds the `Content-Encoding: chunked` header value
to requests that do not specify a `Length` header. This makes proxied
OPTIONS requests from web browsers invalid.
Explicitly set the `Content-Length` header of all `OPTIONS` requests to
"0", disabling the default "chunked" encoding behavior [2].
[1] http://www.w3.org/TR/cors/
[2] http://nodejs.org/api/http.html
2014-11-24 17:14:48 -05:00
Sam Saccone
add81338a9
📝 Add host rewrite docs and specs.
2014-11-23 19:22:07 -05:00
Ricky Miller
84036e9ddd
style changes
2014-11-13 06:05:32 +09:00
Ricky Miller
daa2ce0ee3
copy headers instead of referencing them so they don't unexpectedly get overwritten
2014-11-13 04:37:45 +09:00
Ricky Miller
4a2b870cc9
do not modify the query string
2014-11-09 08:44:22 +09:00
Alex Oshchepkov
796ab0bcc5
Added changeOrigin option with test and docs
2014-10-29 07:25:19 +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
77305489d9
test closing upstream socket prior to upgrade
...
should close the client socket with ECONNRESET,
but currently is left hanging.
2014-09-30 16:11:49 -07:00
MinRK
ec683b924b
test new detection of connection: upgrade
2014-09-16 12:09:26 -07:00
Samuel Reed
73d865bc9f
Fix breaking bug on url joining resulting in paths like ///path.
...
Added OS-agnostic url join helper.
2014-09-12 13:08:10 -04:00
Jarrett Cruger
e44fabe58a
[test] add test for prependPath option
2014-09-11 18:51:49 -04:00
Sean Massa
a65021d52b
fix tests for maintaining proxy path
2014-09-08 17:17:15 -05:00
John Catron
a3d02196c5
Added close method to proxy server.
...
Ensured server exists before closing.
Updated tests to use new close function.
Added documentation to README.
2014-08-14 17:30:38 +00:00
Manu Sporny
db5f2954b2
[api] Add event-based ability to modify pre-flight proxy requests.
2014-07-18 11:46:04 -04:00
Damian Kaczmarek
7b79a7409a
Change name targetTimeout to proxyTimeout
2014-06-10 19:04:12 +02:00
Damian Kaczmarek
4193d3bd74
Fix #657
2014-06-10 01:50:59 +02:00
Damian Kaczmarek
0f243516e1
Added targetTimeout option and two tests for timeout
2014-06-10 01:35:53 +02:00
Bryce Gibson
1385635e18
Add a test for the proxyRes event
2014-05-12 08:44:02 +10:00
Jay Harris
8aa7c519b1
Adding test cases on preventing upgrade override
2014-05-09 22:49:23 -04:00
Jarrett Cruger
61c8734e8b
[fix test] handle proxy error since we are properly aborting the proxy Request
2014-04-14 13:17:18 -04:00
Sam Beran
e633b0f7e4
Add support for localAddress
...
When we make outgoing requests, we may want to bind to a specific local
address. This change allows the localAddress property to be specified
via the options object.
2014-02-11 15:01:03 -06: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
cronopio
d83fdf69a1
[tests] disabled the examples-test by now
2013-12-18 12:18:59 -05:00
cronopio
bc236d7e95
[tests] Added a test case for run all the examples
...
* I changed all the ports across examples to be different and can run at same time
2013-12-18 12:18:58 -05:00
cronopio
cfd417de23
[tests] fix tests set correct host headers
2013-12-18 12:17:41 -05:00
cronopio
c4d56a5faf
[tests] fix test using undefined url
2013-12-18 11:50:49 -05:00
yawnt
10c0f11b68
[fix] remove duplicate
2013-11-19 20:05:46 +01:00
cronopio
bbe3bfdf98
[tests] added test HTTPS to HTTP using own server
2013-11-07 21:27:50 -05:00
cronopio
31d919b0a3
[tests] added HTTPS to HTTPS test
2013-11-07 18:06:51 -05:00
cronopio
fd42dcef01
[tests] https test pass, fix #511 . Exposed the rejectUnauthorized flag
2013-11-07 15:09:37 -05:00
cronopio
a2b1f0a4c9
[tests] disable test, by now is not throwing without options
2013-11-07 15:06:45 -05:00
cronopio
8085178dc2
[tests] Using target field, tests now pass. We are missing the tests using forward field
2013-10-29 16:46:27 -05:00
cronopio
33a2462d28
[wip] Initial HTTPS->HTTP test, updated https-secure example. Work in progress, need to add more https tests
2013-10-28 13:18:21 -05:00
cronopio
920f1e7707
[tests] this test is already in web-incoming tests
2013-10-22 16:09:11 -05:00
cronopio
c75d06c5f9
[tests] now each test use a different port to avoid some slow opening and closing ports
2013-10-22 15:57:52 -05:00
cronopio
d60353f80b
[tests] tests fixed
2013-10-21 23:22:59 -05:00
cronopio
881c7e62e0
[tests] this file is not necessary anymore
2013-10-21 21:22:39 -05:00
cronopio
7c72f3b407
[tests] move contributions of @mmoulton to correct place
2013-10-21 21:11:19 -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
5d66ce11bb
[fix] minor typo
2013-10-21 14:51:45 -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
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