]> git.kaiwu.me - nginx.git/commitdiff
test the more likely case first
authorIgor Sysoev <igor@sysoev.ru>
Sun, 16 Mar 2008 16:47:16 +0000 (16:47 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 16 Mar 2008 16:47:16 +0000 (16:47 +0000)
src/http/ngx_http_parse.c

index 2e38434b9c94862f19976f14c8d4bd68a6e4b246..9777ebb988c5d775bc53e313ae7b63646586425d 100644 (file)
@@ -882,10 +882,10 @@ ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b)
         /* 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;
             }