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 lateby ariesone - Nginx Mailing List - English