Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 6993:8801ff7d58e1
Don't pretend we support HTTP major versions >1 as HTTP/1.1.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 25 Apr 2017 23:39:13 +0300 |
parents | 5d3d9b52327d |
children | 9552758a786e |
comparison
equal
deleted
inserted
replaced
6992:330b6c33a5c4 | 6993:8801ff7d58e1 |
---|---|
70 "client sent invalid method", | 70 "client sent invalid method", |
71 | 71 |
72 /* NGX_HTTP_PARSE_INVALID_REQUEST */ | 72 /* NGX_HTTP_PARSE_INVALID_REQUEST */ |
73 "client sent invalid request", | 73 "client sent invalid request", |
74 | 74 |
75 /* NGX_HTTP_PARSE_INVALID_VERSION */ | |
76 "client sent invalid version", | |
77 | |
75 /* NGX_HTTP_PARSE_INVALID_09_METHOD */ | 78 /* NGX_HTTP_PARSE_INVALID_09_METHOD */ |
76 "client sent invalid method in HTTP/0.9 request" | 79 "client sent invalid method in HTTP/0.9 request" |
77 }; | 80 }; |
78 | 81 |
79 | 82 |
1034 | 1037 |
1035 /* there was error while a request line parsing */ | 1038 /* there was error while a request line parsing */ |
1036 | 1039 |
1037 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 1040 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
1038 ngx_http_client_errors[rc - NGX_HTTP_CLIENT_ERROR]); | 1041 ngx_http_client_errors[rc - NGX_HTTP_CLIENT_ERROR]); |
1039 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); | 1042 |
1043 if (rc == NGX_HTTP_PARSE_INVALID_VERSION) { | |
1044 ngx_http_finalize_request(r, NGX_HTTP_VERSION_NOT_SUPPORTED); | |
1045 | |
1046 } else { | |
1047 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); | |
1048 } | |
1049 | |
1040 return; | 1050 return; |
1041 } | 1051 } |
1042 | 1052 |
1043 /* NGX_AGAIN: a request line parsing is still incomplete */ | 1053 /* NGX_AGAIN: a request line parsing is still incomplete */ |
1044 | 1054 |