We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b83991 commit 10ac540Copy full SHA for 10ac540
src/ngx_http_modsecurity_rewrite.c
@@ -146,12 +146,13 @@ ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r)
146
const char *n_method = ngx_str_to_char(r->request_line, r->pool);
147
if (n_method != NULL && n_method != (char *)-1) {
148
char *p = (char *) n_method;
149
- while (*p >= 'A' && *p <= 'Z') {
+ while (*p) {
150
+ if (*p == ' ') {
151
+ *p = '\0';
152
+ break;
153
+ }
154
p++;
155
}
- if (*p) {
- *p = '\0';
- }
156
157
if (n_uri == (char*)-1 || n_method == (char*)-1) {
158
return NGX_HTTP_INTERNAL_SERVER_ERROR;
0 commit comments