@@ -471,7 +471,7 @@ ngx_http_modsecurity_header_filter(ngx_http_request_t *r)
471
471
*/
472
472
for (i = 0 ; ngx_http_modsecurity_headers_out [i ].name .len ; i ++ )
473
473
{
474
- dd (" Sending header to ModSecurity - header: `%.*s'. " ,
474
+ dd ("Sending header to ModSecurity - header: `%.*s'" ,
475
475
(int ) ngx_http_modsecurity_headers_out [i ].name .len ,
476
476
ngx_http_modsecurity_headers_out [i ].name .data );
477
477
@@ -516,14 +516,24 @@ ngx_http_modsecurity_header_filter(ngx_http_request_t *r)
516
516
517
517
/*
518
518
* NGINX always sends HTTP response with HTTP/1.1, except cases when
519
- * HTTP V2 module is enabled, and request has been posted with HTTP/2.0.
519
+ * HTTP V2 module is enabled, and request has been posted with HTTP/2.0
520
+ * or when using HTTP V3
520
521
*/
521
- http_response_ver = "HTTP 1.1" ;
522
- #if (NGX_HTTP_V2 )
523
- if (r -> stream ) {
524
- http_response_ver = "HTTP 2.0" ;
525
- }
522
+ switch (r -> http_version ) {
523
+ #ifdef NGX_HTTP_VERSION_30
524
+ case NGX_HTTP_VERSION_30 :
525
+ http_response_ver = "HTTP 3.0" ;
526
+ break ;
527
+ #endif
528
+ #ifdef NGX_HTTP_VERSION_20
529
+ case NGX_HTTP_VERSION_30 :
530
+ http_response_ver = "HTTP 2.0" ;
531
+ break ;
526
532
#endif
533
+ default :
534
+ http_response_ver = "HTTP 1.1" ;
535
+ break ;
536
+ }
527
537
528
538
old_pool = ngx_http_modsecurity_pcre_malloc_init (r -> pool );
529
539
msc_process_response_headers (ctx -> modsec_transaction , status , http_response_ver );
0 commit comments