Mercurial > hg > nginx
diff src/http/ngx_http_parse.c @ 639:715d24327080 release-0.3.41
nginx-0.3.41-RELEASE import
*) Feature: the -v switch.
*) Bugfix: the segmentation fault may occurred if the SSI page has
remote subrequests.
*) Bugfix: in FastCGI handling.
*) Bugfix: if the perl modules path was not set using
--with-perl_modules_path=PATH or the "perl_modules", then the
segmentation fault was occurred.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 21 Apr 2006 12:06:44 +0000 |
parents | e60fe4cf1d4e |
children | 1e720b0be7ec |
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c Wed Apr 19 15:30:56 2006 +0000 +++ b/src/http/ngx_http_parse.c Fri Apr 21 12:06:44 2006 +0000 @@ -67,17 +67,18 @@ r->method_end = p - 1; m = r->request_start; - if (p - m == 3) { + switch (p - m) { + case 3: if (m[0] == 'G' && m[1] == 'E' && m[2] == 'T') { r->method = NGX_HTTP_GET; } else if (m[0] == 'P' && m[1] == 'U' && m[2] == 'T') { r->method = NGX_HTTP_PUT; } + break; - } else if (p - m == 4) { - + case 4: if (m[0] == 'P' && m[1] == 'O' && m[2] == 'S' && m[3] == 'T') { @@ -88,22 +89,23 @@ { r->method = NGX_HTTP_HEAD; } + break; - } else if (p - m == 5) { - + case 5: if (m[0] == 'M' && m[1] == 'K' && m[2] == 'C' && m[3] == 'O' && m[4] == 'L') { r->method = NGX_HTTP_MKCOL; } + break; - } else if (p - m == 6) { - + case 6: if (m[0] == 'D' && m[1] == 'E' && m[2] == 'L' && m[3] == 'E' && m[4] == 'T' && m[5] == 'E') { r->method = NGX_HTTP_DELETE; } + break; } state = sw_spaces_before_uri;