I'm using nginx(1.8.1) as a server. I make a OPTIONS request with chunked encoding body by using fiddler, and this request will go through a proxy before it gets to nginx. But the proxy have some problem with the OPTIONS request that the proxy only send the header of this request to nginx, the chunked body is NOT sent. The result is that nginx doesn't wait for the chunked body and send out a response immediately. How do I config nginx to hold the OPTIONS request header and wait for the body and then send a response to client?Thanks for your help!
Notice: because nginx can not handle OPTIONS request by default, so I add some directives in location context as below, which I learn from Handling OPTIONS request in nginx
if ($request_method = OPTIONS ) {
#add_header Content-Length 0;
add_header Content-Type text/plain;
return 200;
}
also, this is my OPTIONS request with chunked encoding body:
OPTIONS / HTTP/1.1
Transfer-Encoding: chunked
Host: myserver.com
\r\n
\r\n
2\r\n
hi\r\n
0\r\n\r\n