Response with error code
amastr
nginx-forum at nginx.us
Thu Oct 27 08:27:32 UTC 2011
Hi, all.
I need a help in the following question.
I send a request to the nginx server and I need to support only 1.1
version of the http protocol. If version is differ from "1.1", the error
code should be sent in the response.
For this purpose I set "err_status" parameter of the ngx_http_request_t
to error code and then call
ngx_http_discard_request_body(ngx_http_request_t *r);
After that I call ngx_http_send_header(ngx_http_request_t *r) and
ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *chain);
(where chain is NULL). But in this case client receives 0 bytes in the
response.
Could you help me to find a problem?
NOTE: If version is set to "1.1" in the request, the response is
successfully sent and has OK status
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,217395,217395#msg-217395
More information about the nginx
mailing list