Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_parse.c @ 188:af37b7cb6698 NGINX_0_3_41
nginx 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.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 21 Apr 2006 00:00:00 +0400 |
parents | 54aabf2b0bc6 |
children | e6da4931e0e0 |
comparison
equal
deleted
inserted
replaced
187:c0ed72c62dfa | 188:af37b7cb6698 |
---|---|
65 case sw_method: | 65 case sw_method: |
66 if (ch == ' ') { | 66 if (ch == ' ') { |
67 r->method_end = p - 1; | 67 r->method_end = p - 1; |
68 m = r->request_start; | 68 m = r->request_start; |
69 | 69 |
70 if (p - m == 3) { | 70 switch (p - m) { |
71 | 71 |
72 case 3: | |
72 if (m[0] == 'G' && m[1] == 'E' && m[2] == 'T') { | 73 if (m[0] == 'G' && m[1] == 'E' && m[2] == 'T') { |
73 r->method = NGX_HTTP_GET; | 74 r->method = NGX_HTTP_GET; |
74 | 75 |
75 } else if (m[0] == 'P' && m[1] == 'U' && m[2] == 'T') { | 76 } else if (m[0] == 'P' && m[1] == 'U' && m[2] == 'T') { |
76 r->method = NGX_HTTP_PUT; | 77 r->method = NGX_HTTP_PUT; |
77 } | 78 } |
78 | 79 break; |
79 } else if (p - m == 4) { | 80 |
80 | 81 case 4: |
81 if (m[0] == 'P' && m[1] == 'O' | 82 if (m[0] == 'P' && m[1] == 'O' |
82 && m[2] == 'S' && m[3] == 'T') | 83 && m[2] == 'S' && m[3] == 'T') |
83 { | 84 { |
84 r->method = NGX_HTTP_POST; | 85 r->method = NGX_HTTP_POST; |
85 | 86 |
86 } else if (m[0] == 'H' && m[1] == 'E' | 87 } else if (m[0] == 'H' && m[1] == 'E' |
87 && m[2] == 'A' && m[3] == 'D') | 88 && m[2] == 'A' && m[3] == 'D') |
88 { | 89 { |
89 r->method = NGX_HTTP_HEAD; | 90 r->method = NGX_HTTP_HEAD; |
90 } | 91 } |
91 | 92 break; |
92 } else if (p - m == 5) { | 93 |
93 | 94 case 5: |
94 if (m[0] == 'M' && m[1] == 'K' | 95 if (m[0] == 'M' && m[1] == 'K' |
95 && m[2] == 'C' && m[3] == 'O' && m[4] == 'L') | 96 && m[2] == 'C' && m[3] == 'O' && m[4] == 'L') |
96 { | 97 { |
97 r->method = NGX_HTTP_MKCOL; | 98 r->method = NGX_HTTP_MKCOL; |
98 } | 99 } |
99 | 100 break; |
100 } else if (p - m == 6) { | 101 |
101 | 102 case 6: |
102 if (m[0] == 'D' && m[1] == 'E' && m[2] == 'L' | 103 if (m[0] == 'D' && m[1] == 'E' && m[2] == 'L' |
103 && m[3] == 'E' && m[4] == 'T' && m[5] == 'E') | 104 && m[3] == 'E' && m[4] == 'T' && m[5] == 'E') |
104 { | 105 { |
105 r->method = NGX_HTTP_DELETE; | 106 r->method = NGX_HTTP_DELETE; |
106 } | 107 } |
108 break; | |
107 } | 109 } |
108 | 110 |
109 state = sw_spaces_before_uri; | 111 state = sw_spaces_before_uri; |
110 break; | 112 break; |
111 } | 113 } |