Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions src/ngx_http_modsecurity_rewrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,27 @@ ngx_int_t ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r)
return ret;
}

/**
* TODO: Fix http_version
*
*/
const char *http_version;
switch (r->http_version) {
case NGX_HTTP_VERSION_9 :
http_version = "0.9";
break;
case NGX_HTTP_VERSION_10 :
http_version = "1.0";
break;
case NGX_HTTP_VERSION_11 :
http_version = "1.1";
break;
case NGX_HTTP_VERSION_20 :
http_version = "2.0";
break;
default :
http_version = "1.0";
break;
}

msc_process_uri(ctx->modsec_transaction, ngx_str_to_char(r->unparsed_uri, r->pool),
ngx_str_to_char(r->method_name, r->pool), "1.0"
ngx_str_to_char(r->method_name, r->pool), http_version
);
ret = ngx_http_modsecurity_process_intervention(ctx->modsec_transaction, r);
if (ret > 0)
Expand Down