Transfer-encoding chunked hex markers appearing in output?
Cliff Wells
cliff at develix.com
Mon Mar 5 05:48:40 UTC 2012
On Mon, 2012-03-05 at 11:22 +0800, Henry wrote:
> However when I put nginx in front of it I get what appear to be the
> chunk hex markers in the output - which obviously renders the XML
> invalid. Here is an example of the output, note the "f32" at line 1, and
> the repeated "1000" on lines 53 & 85, the
> "58a" on lines 125 & 137 and so on.
There is an experimental patch that allows Nginx to speak HTTP 1.1 to
backends (including chunked responses):
http://mailman.nginx.org/pipermail/nginx/2011-August/028324.html
I'm afraid I don't know if it will apply against 1.0.12.
Regards,
Cliff
> https://gist.github.com/1973377
>
> Here is my (reduced) nginx conf:
>
> server {
> listen 80;
> server_name feeder;
> location / {
> proxy_pass http://127.0.0.1:8888;
> }
> }
>
> I've confirmed that the chunks themselves don't contain the spurious
> data (by dumping them to a file and checking with dhex), and apart from
> the expected Server: change the HTTP headers are the same with and
> without nginx:
>
> HTTP/1.1 200
> Server: nginx/1.0.12
> Date: Mon, 05 Mar 2012 02:02:38 GMT
> Content-Type: text/xml; charset=UTF-8
> Connection: keep-alive
> etag: rM1jGkNUA9AzVj2iMQN9KWwLgcQ
> last-modified: Mon, 05 Mar 2012 02:07:53 GMT
> expires: Mon, 05 Mar 2012 02:08:03 GMT
> cache-control: private, max-age=0
> x-content-type-options: nosniff
> x-xss-protection: 1; mode=block
> transfer-encoding: chunked
>
> I'm at a loss how to proceed and I'm hoping someone on the list
> recognises the problem.
>
> In case it's relevant, here is the code for the script, with the lines
> that do the proxying highlighted:
>
> https://github.com/hjst/feeder/blob/bd610bd981ab4b2184610775d3c6bf4b3f37d863/feeder.js#L45-47
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list