Skip to content
Permalink
Browse files

Merge pull request #552 from nodejitsu/caronte-merge

Http proxy 1.0
  • Loading branch information...
yawnt committed Jan 16, 2014
2 parents 840f6d8 + d6d2d0c commit 3330e125aaf85862399141bf0ad5af3aea4f1000
Showing with 2,416 additions and 6,519 deletions.
  1. +7 −3 .gitignore
  2. +3 −1 .travis.yml
  3. +2 −95 CHANGELOG.md
  4. +1 −1 LICENSE
  5. +197 −521 README.md
  6. +96 −0 UPGRADING.md
  7. +33 −0 benchmark/README.md
  8. +3 −0 benchmark/scripts/hello.js
  9. +6 −0 benchmark/scripts/proxy.js
  10. +1 −1 benchmark/{ → scripts}/websockets-throughput.js
  11. +0 −113 bin/node-http-proxy
  12. +0 −10 config.sample.json
  13. BIN doc/logo.png
  14. +31 −5 examples/balancer/simple-balancer-with-websockets.js
  15. +33 −5 examples/balancer/simple-balancer.js
  16. +8 −6 examples/http/basic-proxy.js
  17. +8 −6 examples/http/concurrent-proxy.js
  18. +11 −10 examples/http/custom-proxy-error.js
  19. +29 −20 examples/{middleware/gzip-middleware-proxytable.js → http/error-handling.js}
  20. +26 −10 examples/http/{proxy-table.js → forward-and-target-proxy.js}
  21. +8 −18 examples/http/forward-proxy.js
  22. +11 −13 examples/http/latent-proxy.js
  23. +18 −30 examples/{middleware/url-middleware.js → http/proxy-http-to-https.js}
  24. +23 −14 examples/http/proxy-https-to-http.js
  25. +19 −15 examples/http/proxy-https-to-https.js
  26. +9 −12 examples/http/standalone-proxy.js
  27. +41 −9 examples/middleware/bodyDecoder-middleware.js
  28. +24 −9 examples/middleware/gzip-middleware.js
  29. +0 −30 examples/middleware/jsonp-middleware.js
  30. +19 −9 examples/middleware/modifyResponse-middleware.js
  31. +0 −30 examples/middleware/url-middleware2.js
  32. +9 −8 examples/package.json
  33. +10 −11 examples/websocket/latent-websocket-proxy.js
  34. +11 −10 examples/websocket/standalone-websocket-proxy.js
  35. +6 −5 examples/websocket/websocket-proxy.js
  36. +13 −0 index.js
  37. +55 −0 lib/http-proxy.js
  38. +82 −0 lib/http-proxy/common.js
  39. +153 −0 lib/http-proxy/index.js
  40. +134 −0 lib/http-proxy/passes/web-incoming.js
  41. +78 −0 lib/http-proxy/passes/web-outgoing.js
  42. +121 −0 lib/http-proxy/passes/ws-incoming.js
  43. +0 −397 lib/node-http-proxy.js
  44. +0 −983 lib/node-http-proxy/http-proxy.js
  45. +0 −282 lib/node-http-proxy/proxy-table.js
  46. +0 −322 lib/node-http-proxy/routing-proxy.js
  47. +31 −38 package.json
  48. +0 −10 test/core/README.md
  49. +0 −190 test/core/common.js
  50. +0 −69 test/core/pummel/test-http-upload-timeout.js
  51. +0 −90 test/core/run
  52. +0 −70 test/core/run-single
  53. +0 −63 test/core/simple/test-http-chunked.js
  54. +0 −80 test/core/simple/test-http-client-abort.js
  55. +0 −41 test/core/simple/test-http-client-abort2.js
  56. +0 −74 test/core/simple/test-http-client-upload-buf.js
  57. +0 −77 test/core/simple/test-http-client-upload.js
  58. +0 −42 test/core/simple/test-http-contentLength0.js
  59. +0 −40 test/core/simple/test-http-eof-on-connect.js
  60. +0 −86 test/core/simple/test-http-extra-response.js
  61. +0 −56 test/core/simple/test-http-head-request.js
  62. +0 −61 test/core/simple/test-http-head-response-has-no-body-end.js
  63. +0 −58 test/core/simple/test-http-head-response-has-no-body.js
  64. +0 −101 test/core/simple/test-http-host-headers.js
  65. +0 −68 test/core/simple/test-http-many-keep-alive-connections.js
  66. +0 −59 test/core/simple/test-http-multi-line-headers.js
  67. +0 −109 test/core/simple/test-http-proxy.js
  68. +0 −55 test/core/simple/test-http-response-close.js
  69. +0 −59 test/core/simple/test-http-server-multiheaders.js
  70. +0 −84 test/core/simple/test-http-set-cookies.js
  71. +0 −69 test/core/simple/test-http-status-code.js
  72. +0 −72 test/core/simple/test-http-upgrade-server2.js
  73. +0 −108 test/core/simple/test-http.js
  74. +70 −25 test/examples-test.js
  75. +0 −182 test/helpers/http.js
  76. +0 −105 test/helpers/index.js
  77. +0 −112 test/helpers/ws.js
  78. +0 −102 test/http/http-test.js
  79. +0 −107 test/http/routing-table-test.js
  80. +103 −0 test/lib-http-proxy-common-test.js
  81. +130 −0 test/lib-http-proxy-passes-web-incoming-test.js
  82. +104 −0 test/lib-http-proxy-passes-web-outgoing-test.js
  83. +120 −0 test/lib-http-proxy-passes-ws-incoming-test.js
  84. +297 −0 test/lib-http-proxy-test.js
  85. +222 −0 test/lib-https-proxy-test.js
  86. +0 −101 test/macros/examples.js
  87. +0 −531 test/macros/http.js
  88. +0 −11 test/macros/index.js
  89. +0 −232 test/macros/ws.js
  90. +0 −25 test/ws/routing-table-test.js
  91. +0 −20 test/ws/socket.io-test.js
  92. +0 −23 test/ws/ws-test.js
@@ -1,3 +1,7 @@
config.json
node_modules/
npm-debug.log
node_modules
*.swp
cov
atest.js
notes
primus-proxy.js
tes.js
@@ -1,10 +1,12 @@
language: node_js
node_js:
- 0.8
- "0.10"
- "0.11"

notifications:
email:
- travis@nodejitsu.com
irc: "irc.freenode.org#nodejitsu"

script:
npm test
@@ -1,97 +1,4 @@
## ChangeLog for: node-http-proxy
### v 1.0.0-alpha

## Version 0.10.0 - 3/18/2013
- Complete refactor with new API

- Breaking change: `proxyResponse` events are emitted on the `HttpProxy` or `RoutingProxy` instances as originally was intended in `0.9.x`.

## Version 0.9.1 - 3/9/2013

- Ensure that `webSocketProxyError` and `proxyError` both receive the error (indexzero).

## Version 0.9.0 - 3/9/2013
- Fix #276 Ensure response.headers.location is defined (indexzero)
- Fix #248 Make options immutable in RoutingProxy (indexzero)
- Fix #359 Do not modify the protocol in redirect request for external sites. (indexzero)
- Fix #373 Do not use "Transfer-Encoding: chunked" header for proxied DELETE requests with no "Content-Length" header. (indexzero)
- Fix #338 Set "content-length" header to "0" if it is not already set on DELETE requests. (indexzero)
- Updates to README.md and Examples (ramitos, jamie-stackhouse, oost, indexzero)
- Fixes to ProxyTable and Routing Proxy (adjohnson916, otavoijr)
- New API for ProxyTable (mikkel, tglines)
- Add `options.timeout` for specifying socket timeouts (pdoran)
- Improve bin/node-http-proxy (niallo)
- Don't emit `proxyError` twice (erasmospunk)
- Fix memory leaks in WebSocket proxying
- Support UNIX Sockets (yosefd)
- Fix truncated chunked respones (jpetazzo)
- Allow upstream listeners to get `proxyResponse` (colinmollenhour)

## Version 0.8.1 - 6/5/2012
- Fix re-emitting of events in RoutingProxy (coderarity)
- New load balancer and middleware examples (marak)
- Docs updated including changelog (lot of gently people)

## Version 0.8.0 - 12/23/2011
- Improve support and tests for url segment routing (maxogden)
- Fix aborting connections when request close (c4milo)
- Avoid 'Transfer-Encoding' on HTTP/1.0 clients (koichik).
- Support for Node.js 0.6.x (mmalecki)

## Version 0.7.3 - 10/4/2011
- Fix setting x-forwarded headers (jesusabdullah)
- Updated examples (AvianFlu)

## Version 0.7.0 - 9/10/2011
- Handles to every throw-able resume() call (isaacs)
- Updated tests, README and package.json (indexzero)
- Added HttpProxy.close() method (indexzero)

## Version 0.6.6 - 8/31/2011
- Add more examples (dominictarr)
- Use of 'pkginfo' (indexzero)
- Handle cases where res.write throws (isaacs)
- Handles to every throw-able res.end call (isaacs)

## Version 0.5.11 - 6/21/2011
- Add more examples with WebSockets (indexzero)
- Update the documentation (indexzero)

## Version 0.5.7 - 5/19/2011
- Fix to README related to markup and fix some examples (benatkin)
- Improve WebSockets handling (indexzero)
- Improve WebSockets tests (indexzero)
- Improve https tests (olauzon)
- Add devDependencies to package.json (olauzon)
- Add 'proxyError' event (indexzero)
- Add 'x-forwarded-{port|proto}' headers support (indexzero)
- Keep-Alive connection supported (indexzero)

## Version 0.5.0 - 4/15/2011
- Remove winston in favor of custom events (indexzero)
- Add x-forwarded-for Header (indexzero)
- Fix WebSocket support (indexzero)
- Add tests / examples for WebSocket support (indexzero)
- Update .proxyRequest() and .proxyWebSocketRequest() APIs (indexzero)
- Add HTTPS support (indexzero)
- Add tests / examples for HTTPS support (indexzero)

## Version 0.4.1 - 3/20/2011
- Include missing dependency in package.json (indexzero)

## Version 0.4.0 - 3/20/2011
- Update for node.js 0.4.0 (indexzero)
- Remove pool dependency in favor of http.Agent (indexzero)
- Store buffered data using `.buffer()` instead of on the HttpProxy instance (indexzero)
- Change the ProxyTable to be a lookup table instead of actively proxying (indexzero)
- Allow for pure host-only matching in ProxyTable (indexzero)
- Use winston for logging (indexzero)
- Improve tests with async setup and more coverage (indexzero)
- Improve code documentation (indexzero)

### Version 0.3.1 - 11/22/2010
- Added node-http-proxy binary script (indexzero)
- Added experimental WebSocket support (indutny)
- Added forward proxy functionality (indexzero)
- Added proxy table for multiple target lookup (indexzero)
- Simplified tests using helpers.js (indexzero)
- Fixed uncaughtException bug with invalid proxy target (indutny)
- Added configurable logging for HttpProxy and ProxyTable (indexzero)
@@ -1,7 +1,7 @@

node-http-proxy

Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires
Copyright (c) Nodejitsu 2013

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

0 comments on commit 3330e12

Please sign in to comment.
You can’t perform that action at this time.