Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #220 from lackac/http-proxy-version
Browse files Browse the repository at this point in the history
Updated http-proxy to ~> 0.7.0
  • Loading branch information
josh committed Oct 12, 2011
2 parents 2b5e657 + 8494954 commit 4b85f17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions lib/http_server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -12,7 +12,7 @@
"async": "0.1.8"
, "coffee-script": ">= 1.1.0"
, "connect": ">= 1.0.3"
, "http-proxy": ">= 0.5.8"
, "http-proxy": "~> 0.7.0"
, "log": ">= 1.1.1"
, "nack": "~> 0.12.2"
, "ndns": ">= 0.1.2"
Expand Down
4 changes: 2 additions & 2 deletions src/http_server.coffee
Expand Up @@ -179,12 +179,12 @@ module.exports = class HttpServer extends connect.HTTPServer
return next() unless req.pow.url
{hostname, port} = url.parse req.pow.url

proxy = new HttpProxy()
proxy = new HttpProxy target: {host: hostname, port}
proxy.on 'proxyError', (err, req, res) ->
renderResponse res, 500, "proxy_error",
{err, hostname, port}

proxy.proxyRequest req, res, {host: hostname, port}
proxy.proxyRequest req, res

req.pow.resume()

Expand Down

0 comments on commit 4b85f17

Please sign in to comment.