aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2020-02-28 13:09:52 +0300
committerSergey Kandaurov <pluknet@nginx.com>2020-02-28 13:09:52 +0300
commit899372129879b5874ffddca4247fca12d3b7c257 (patch)
tree1fc2ba4fb882bba330e7e06cdd4bb016de417470 /src/http/ngx_http_request.c
parentef8b06b186a2f7ac25b8ee49a325c935c3e5bb9f (diff)
downloadnginx-899372129879b5874ffddca4247fca12d3b7c257.tar.gz
nginx-899372129879b5874ffddca4247fca12d3b7c257.zip
Introduced quic_version macro, uint16/uint32 routines ported.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index bc2797b21..d40f50496 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -691,13 +691,13 @@ ngx_http_quic_handshake(ngx_event_t *rev)
}
ngx_int_t flags = *b->pos++;
- uint32_t version = ngx_http_v2_parse_uint32(b->pos);
- b->pos += 4;
+ uint32_t version = ngx_quic_parse_uint32(b->pos);
+ b->pos += sizeof(uint32_t);
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, rev->log, 0,
"quic flags:%xi version:%xD", flags, version);
- if (version != 0xff000018) {
+ if (version != quic_version) {
ngx_log_error(NGX_LOG_INFO, rev->log, 0, "unsupported quic version");
ngx_http_close_connection(c);
return;
@@ -1117,13 +1117,13 @@ ngx_http_quic_handshake_handler(ngx_event_t *rev)
}
ngx_int_t flags = *p++;
- uint32_t version = ngx_http_v2_parse_uint32(p);
- p += 4;
+ uint32_t version = ngx_quic_parse_uint32(p);
+ p += sizeof(uint32_t);
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, rev->log, 0,
"quic flags:%xi version:%xD", flags, version);
- if (version != 0xff000018) {
+ if (version != quic_version) {
ngx_log_error(NGX_LOG_INFO, rev->log, 0, "unsupported quic version");
ngx_http_close_connection(c);
return;