Skip to content

Commit 34f84f9

Browse files
committed
Do not allocate new string when processing HTTP3 request
1 parent ef64996 commit 34f84f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ngx_http_modsecurity_rewrite.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,15 @@ ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r)
134134
case NGX_HTTP_VERSION_11 :
135135
http_version = "1.1";
136136
break;
137-
#if defined(nginx_version) && nginx_version >= 1009005
137+
#ifdef NGX_HTTP_VERSION_20
138138
case NGX_HTTP_VERSION_20 :
139139
http_version = "2.0";
140140
break;
141+
#endif
142+
#ifdef NGX_HTTP_VERSION_30
143+
case NGX_HTTP_VERSION_30 :
144+
http_version = "3.0";
145+
break;
141146
#endif
142147
default :
143148
http_version = ngx_str_to_char(r->http_protocol, r->pool);

0 commit comments

Comments
 (0)