test the more likely case first
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 2e38434..9777ebb 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c
@@ -882,10 +882,10 @@ /* end of header line */ case sw_almost_done: switch (ch) { - case CR: - break; case LF: goto done; + case CR: + break; default: return NGX_HTTP_PARSE_INVALID_HEADER; }