<div dir="ltr">What debugs should i enable & how to see these response headers ? I do see this error though. <div><pre class="" id="comment_text_0" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)">2014/03/03 14:04:32 [error] 11259#0: *6 upstream sent invalid header while reading response header from upstream, client: 127.0.0.1, server: xxx.default, request: "GET /service/home/~/?auth=co&loc=en_GB&id=259&part=3 HTTP/1.1", upstream: "<a href="https://127.0.1.1:8443/service/home/~/?auth=co&loc=en_GB&id=259&part=3" style="color:rgb(102,51,102)">https://127.0.1.1:8443/service/home/~/?auth=co&loc=en_GB&id=259&part=3</a>", host: "xxx", referrer: "<a href="https://server.zimbra.com/" style="color:rgb(102,51,102)">https://xxx/</a>"</pre>
<div class="gmail_extra">So can this be that the upstream is sending the right header (because it works fine when there is no space in the filename) but nginx is parsing it incorrectly ?</div><div class="gmail_extra"><br>
</div><div class="gmail_extra">Thanks</div><div class="gmail_extra">-Kunal<br><div class="gmail_quote">On Sun, Mar 23, 2014 at 5:06 PM, Lukas Tribus <span dir="ltr"><<a href="mailto:luky-37@hotmail.com" target="_blank">luky-37@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<div class=""><br>
<br>
> I have nginx set as a reverse proxy for a mail server and it throws<br>
> this 502 (invalid header) error while trying to fetch a file with a<br>
> space in the filename. Any clues on where is this bug in the nginx code?<br>
<br>
</div>Prior to jumping to conlusion about bugs in nginx, how does this response<br>
header actually look like?<br>
<br>
Section 19.5.1 in RFC2616 [1] mandates the content of the filename-parm<br>
needs to be a quoted string:<br>
> filename-parm = "filename" "=" quoted-string<br>
> [...]<br>
> An example is<br>
> Content-Disposition: attachment; filename="fname.ext"<br>
<br>
Does your response header correctly quote the filename?<br>
<br>
<br>
<br>
Regards,<br>
<br>
Lukas<br>
<br>
<br>
[1] <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1" target="_blank">http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1</a><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div></div></div>