nginx throws a 502 (invalid header) when downloading a file attachment if filename has a space character
luky-37 at hotmail.com
Mon Mar 24 00:06:35 UTC 2014
> I have nginx set as a reverse proxy for a mail server and it throws
> this 502 (invalid header) error while trying to fetch a file with a
> space in the filename. Any clues on where is this bug in the nginx code?
Prior to jumping to conlusion about bugs in nginx, how does this response
header actually look like?
Section 19.5.1 in RFC2616  mandates the content of the filename-parm
needs to be a quoted string:
> filename-parm = "filename" "=" quoted-string
> An example is
> Content-Disposition: attachment; filename="fname.ext"
Does your response header correctly quote the filename?
More information about the nginx