Maxim Dounin
January 16, 2014 11:00AM

On Wed, Jan 15, 2014 at 11:56:30AM -0500, ariesone wrote:

> It seems, when my FCGI server responds to NGINX with "Status: 200
> OK\r\nContent-Type:
> multipart/mixed;boundary=whatever\r\n\r\nboundary=whatever\r\nContent-Type:
> image/jpeg\r\n\r\n<BINARY DATA>"
> The FASTCGI module is taking the 2nd "Content-Type" only and uses it in the
> initial response with the 200.
> The client gets confused when it sees the boundaries and data later.
> If I remove the subsequent "Content-Type:" headers, the initial one with the
> boundary indicator is sent; however, the client now does not know how to
> interpret the <BINARY DATA>.

The second Content-Type header is expected to be in response body
from nginx point of view (i.e., after double CRLF which marks end
of headers), and nginx shouldn't try to interpret it anyhow.

While string you provided looks correct at a first glance, it may
be incorrect depending on language and OS used (e.g., in Perl on
Windows it will likely produce wrong results due to "\n" expanded
to CRLF). Symptoms suggest this is likely the cause and you
should focus on what your app actually returns.

Maxim Dounin

nginx mailing list
Subject Author Posted

Fast CGI module "multipart/mixed" problem (it only accepts 1 "Content-Type" header)

ariesone January 15, 2014 11:56AM

Re: Fast CGI module "multipart/mixed" problem (it only accepts 1 "Content-Type" header)

Maxim Dounin January 16, 2014 11:00AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready