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.
https://github.com/hjst/feeder/blob/61779a484721553316d39cdfba8cb4e1fd5b8dce/feeder.js#L45-55
It attaches a callback to the http.ServerRequest 'data' event which just
calls response.write(). When run with `node feeder.js` everything works
and I get the expected proxied content (in this case an XML feed).
But, when I put nginx in front I get the following instead of clean XML:
https://gist.github.com/1973377
Note the "f32" at line 1, and the repeated "1000" on lines 53 & 85, the
"58a" on lines 125 & 137 and so on.
The input is the same, the machine is the same, the only thing different
is nginx. I've checked the values of the "chunk" var and they're clean.
Does anyone have any idea what might be causing this?
Here's my (reduced) nginx conf:
server {
listen 80;
server_name feeder;
location / {
proxy_pass http://127.0.0.1:8888;
}
}
I'm using node v0.6.11 and nginx 1.0.12.
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en