aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_parse.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-04-21 12:06:44 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-04-21 12:06:44 +0000
commit4ecb4d721de0d6ddc34dfff4dce294415b64b04b (patch)
treefe9970fbe823741145cee16261003083b31e949d /src/http/ngx_http_parse.c
parent7d2d90ce71669e5a5ccb91386d0529df39b1c804 (diff)
downloadnginx-4ecb4d721de0d6ddc34dfff4dce294415b64b04b.tar.gz
nginx-4ecb4d721de0d6ddc34dfff4dce294415b64b04b.zip
nginx-0.3.41-RELEASE importrelease-0.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.c16
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;