Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Revert "Try using pipe on serverRequest again"
Browse files Browse the repository at this point in the history
This reverts commit 9b084c6.
  • Loading branch information
josh committed Feb 11, 2011
1 parent 1272629 commit abd5916
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
13 changes: 12 additions & 1 deletion lib/nack/client.js

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

6 changes: 5 additions & 1 deletion src/nack/client.coffee
Expand Up @@ -105,7 +105,11 @@ exports.Client = class Client extends Socket
metaVariables["REMOTE_PORT"] ?= serverRequest.connection.remotePort

clientRequest = @request serverRequest.method, serverRequest.url, serverRequest.headers, metaVariables
serverRequest.pipe clientRequest

serverRequest.on 'data', (data) -> clientRequest.write data
serverRequest.on 'end', -> clientRequest.end()
serverRequest.on 'error', -> clientRequest.end()
clientRequest.on 'error', -> serverRequest.destroy()

clientRequest.on 'response', (clientResponse) ->
serverResponse.writeHead clientResponse.statusCode, clientResponse.headers
Expand Down

0 comments on commit abd5916

Please sign in to comment.