diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c index 980ea9271..55e3ca94a 100644 --- a/src/http/v2/ngx_http_v2_filter_module.c +++ b/src/http/v2/ngx_http_v2_filter_module.c @@ -946,7 +946,11 @@ ngx_http_v2_push_resource(ngx_http_request_t *r, ngx_str_t *path, host = r->headers_in.host; - if (authority->len == 0 && host) { + if (host == NULL) { + return NGX_ABORT; + } + + if (authority->len == 0) { len = 1 + NGX_HTTP_V2_INT_OCTETS + host->value.len;