use the more correct mask
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index b83810d..2e38434 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c
@@ -775,7 +775,7 @@ if (c) { hash = ngx_hash(hash, c); r->lowcase_header[i++] = c; - i &= ~NGX_HTTP_LC_HEADER_LEN; + i &= (NGX_HTTP_LC_HEADER_LEN - 1); break; }