comparison src/http/ngx_http_request.c @ 5354:62be77b0608f

Assume the HTTP/1.0 version by default. It is believed to be better than fallback to HTTP/0.9, because most of the clients at present time support HTTP/1.0. It allows nginx to return error response code for them in cases when it fail to parse request line, and therefore fail to detect client protocol version. Even if the client does not support HTTP/1.0, this assumption should not cause any harm, since from the HTTP/0.9 point of view it still a valid response.
author Valentin Bartenev <vbart@nginx.com>
date Mon, 02 Sep 2013 03:45:14 +0400
parents aadfadd5af2b
children 31af4ae8ad9c
comparison
equal deleted inserted replaced
5353:1608b1135a1d 5354:62be77b0608f
569 tp = ngx_timeofday(); 569 tp = ngx_timeofday();
570 r->start_sec = tp->sec; 570 r->start_sec = tp->sec;
571 r->start_msec = tp->msec; 571 r->start_msec = tp->msec;
572 572
573 r->method = NGX_HTTP_UNKNOWN; 573 r->method = NGX_HTTP_UNKNOWN;
574 r->http_version = NGX_HTTP_VERSION_10;
574 575
575 r->headers_in.content_length_n = -1; 576 r->headers_in.content_length_n = -1;
576 r->headers_in.keep_alive_n = -1; 577 r->headers_in.keep_alive_n = -1;
577 r->headers_out.content_length_n = -1; 578 r->headers_out.content_length_n = -1;
578 r->headers_out.last_modified_time = -1; 579 r->headers_out.last_modified_time = -1;