diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2006-04-21 12:03:18 +0000 |
|---|---|---|
| committer | Jonathan Kolb <jon@b0g.us> | 2006-04-21 12:03:18 +0000 |
| commit | 984cc0392183bbe02dad30645691f34917b8d78b (patch) | |
| tree | 318259a5fb9ae7be488084e1d92479c5936999e4 /src/http/ngx_http_parse.c | |
| parent | 89fe162fb79c6c3e8c28a4f5a41b2cb2391468da (diff) | |
| download | nginx-984cc0392183bbe02dad30645691f34917b8d78b.tar.gz | |
Changes with nginx 0.3.41 21 Apr 2006v0.3.41
*) 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.
Diffstat (limited to 'src/http/ngx_http_parse.c')
| -rw-r--r-- | src/http/ngx_http_parse.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 11c163290..1b1e963ad 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -67,17 +67,18 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b) 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 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b) { 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; |
