On Mar 4, 10:06 am, Henry <he...@hjst.org> wrote:
> I've written a very simple and specific HTTP proxy which works perfectly
> when run as a standalone script, but produces some strange errors when
> run under nginx. I'm stumped and I'm wondering if anyone on the list has
> seen similar behaviour.

Not sure of the cause of your problem, but here's a couple of tips you
might find useful:

You can rewrite lines 45-55 as:

http.get(options, function(fb_res) {
  response.writeHead(fb_res.statusCode, '', fb_res.headers);
  fb_res.pipe(response);

Additionally, you can do a .write() and .end() for a response in one
go via: response.end('some text');

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to