changeset 5328:17291cb8c76e

Minor ngx_http_parse_request_line() optimization. Noted by Nils Kuhnhenn.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 21 Aug 2013 12:51:31 +0400
parents 6b479db5b52b
children 00bdc9f08a16
files src/http/ngx_http_parse.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c	Tue Aug 20 20:47:16 2013 +0400
+++ b/src/http/ngx_http_parse.c	Wed Aug 21 12:51:31 2013 +0400
@@ -212,14 +212,17 @@
                 case 5:
                     if (ngx_str5cmp(m, 'M', 'K', 'C', 'O', 'L')) {
                         r->method = NGX_HTTP_MKCOL;
+                        break;
                     }
 
                     if (ngx_str5cmp(m, 'P', 'A', 'T', 'C', 'H')) {
                         r->method = NGX_HTTP_PATCH;
+                        break;
                     }
 
                     if (ngx_str5cmp(m, 'T', 'R', 'A', 'C', 'E')) {
                         r->method = NGX_HTTP_TRACE;
+                        break;
                     }
 
                     break;