summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_h1proto.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-01-15 20:50:20 +0300
committerValentin Bartenev <vbart@nginx.com>2018-01-15 20:50:20 +0300
commit0c38ff0e66908e6e80045b9bf71344830dbd9621 (patch)
tree61c274cfa56f2385c75e54b1cb79f249c6837022 /src/nxt_h1proto.c
parenta073616fc35b76fce4c4cc1b3ad30837a22d5499 (diff)
downloadunit-0c38ff0e66908e6e80045b9bf71344830dbd9621.tar.gz
unit-0c38ff0e66908e6e80045b9bf71344830dbd9621.tar.bz2
Checking for major HTTP version.
Diffstat (limited to '')
-rw-r--r--src/nxt_h1proto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index ac60753d..e5141757 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -311,6 +311,10 @@ nxt_h1p_header_parse(nxt_task_t *task, void *obj, void *data)
status = NXT_HTTP_BAD_REQUEST;
break;
+ case NXT_HTTP_PARSE_UNSUPPORTED_VERSION:
+ status = NXT_HTTP_VERSION_NOT_SUPPORTED;
+ break;
+
case NXT_HTTP_PARSE_TOO_LARGE_FIELD:
status = NXT_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE;
break;
@@ -594,6 +598,7 @@ static const nxt_str_t nxt_http_server_error[] = {
nxt_string("HTTP/1.1 502 Bad Gateway\r\n"),
nxt_string("HTTP/1.1 503 Service Unavailable\r\n"),
nxt_string("HTTP/1.1 504 Gateway Timeout\r\n"),
+ nxt_string("HTTP/1.1 505 HTTP Version Not Supported\r\n"),
};