Mercurial > hg > nginx
comparison src/http/ngx_http_parse.c @ 2975:2c0f09aa8574
allow underscore in request method
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 13 Jul 2009 09:33:34 +0000 |
parents | e50a2faac31d |
children | d19467d8c659 |
comparison
equal
deleted
inserted
replaced
2974:63f71723cd2a | 2975:2c0f09aa8574 |
---|---|
141 | 141 |
142 if (ch == CR || ch == LF) { | 142 if (ch == CR || ch == LF) { |
143 break; | 143 break; |
144 } | 144 } |
145 | 145 |
146 if (ch < 'A' || ch > 'Z') { | 146 if ((ch < 'A' || ch > 'Z') && ch != '_') { |
147 return NGX_HTTP_PARSE_INVALID_METHOD; | 147 return NGX_HTTP_PARSE_INVALID_METHOD; |
148 } | 148 } |
149 | 149 |
150 state = sw_method; | 150 state = sw_method; |
151 break; | 151 break; |
255 | 255 |
256 state = sw_spaces_before_uri; | 256 state = sw_spaces_before_uri; |
257 break; | 257 break; |
258 } | 258 } |
259 | 259 |
260 if (ch < 'A' || ch > 'Z') { | 260 if ((ch < 'A' || ch > 'Z') && ch != '_') { |
261 return NGX_HTTP_PARSE_INVALID_METHOD; | 261 return NGX_HTTP_PARSE_INVALID_METHOD; |
262 } | 262 } |
263 | 263 |
264 break; | 264 break; |
265 | 265 |