aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2013-09-02 03:45:14 +0400
committerValentin Bartenev <vbart@nginx.com>2013-09-02 03:45:14 +0400
commit3d7d48e52c4029c8a6e8ad710d8c4055b8da71ce (patch)
treed81260dde4d09ed71d7b02f338a858ae82148ba1 /src/http/ngx_http_request.c
parent9f46a9df864c74a2b175840895173e1ddb2cf6f3 (diff)
downloadnginx-3d7d48e52c4029c8a6e8ad710d8c4055b8da71ce.tar.gz
nginx-3d7d48e52c4029c8a6e8ad710d8c4055b8da71ce.zip
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.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index ca738cbb6..5887376d4 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -571,6 +571,7 @@ ngx_http_create_request(ngx_connection_t *c)
r->start_msec = tp->msec;
r->method = NGX_HTTP_UNKNOWN;
+ r->http_version = NGX_HTTP_VERSION_10;
r->headers_in.content_length_n = -1;
r->headers_in.keep_alive_n = -1;