# HG changeset patch # User Igor Sysoev # Date 1205686036 0 # Node ID 5acc8bea2c49644b7adf01363accc14ac6994a8a # Parent 2546677dae0b7babf9a2cc0c10a842a8164c76d4 test the more likely case first diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -882,10 +882,10 @@ ngx_http_parse_header_line(ngx_http_requ /* end of header line */ case sw_almost_done: switch (ch) { + case LF: + goto done; case CR: break; - case LF: - goto done; default: return NGX_HTTP_PARSE_INVALID_HEADER; }