changeset 1943:5acc8bea2c49

test the more likely case first
author Igor Sysoev <igor@sysoev.ru>
date Sun, 16 Mar 2008 16:47:16 +0000
parents 2546677dae0b
children be6c9033a798
files src/http/ngx_http_parse.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
             }