Skip to content

Commit

Permalink
Do not allocate new string when processing HTTP3 request
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubOnderka committed Oct 22, 2024
1 parent ef64996 commit 34f84f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ngx_http_modsecurity_rewrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,15 @@ ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r)
case NGX_HTTP_VERSION_11 :
http_version = "1.1";
break;
#if defined(nginx_version) && nginx_version >= 1009005
#ifdef NGX_HTTP_VERSION_20
case NGX_HTTP_VERSION_20 :
http_version = "2.0";
break;
#endif
#ifdef NGX_HTTP_VERSION_30
case NGX_HTTP_VERSION_30 :
http_version = "3.0";
break;
#endif
default :
http_version = ngx_str_to_char(r->http_protocol, r->pool);
Expand Down

0 comments on commit 34f84f9

Please sign in to comment.