mirror of
https://github.com/nginx/nginx.git
synced 2025-08-06 14:56:15 +08:00
Minor ngx_http_parse_request_line() optimization.
Noted by Nils Kuhnhenn.
This commit is contained in:
parent
e09741ba06
commit
0a6efeee71
@ -212,14 +212,17 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
case 5:
|
case 5:
|
||||||
if (ngx_str5cmp(m, 'M', 'K', 'C', 'O', 'L')) {
|
if (ngx_str5cmp(m, 'M', 'K', 'C', 'O', 'L')) {
|
||||||
r->method = NGX_HTTP_MKCOL;
|
r->method = NGX_HTTP_MKCOL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_str5cmp(m, 'P', 'A', 'T', 'C', 'H')) {
|
if (ngx_str5cmp(m, 'P', 'A', 'T', 'C', 'H')) {
|
||||||
r->method = NGX_HTTP_PATCH;
|
r->method = NGX_HTTP_PATCH;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_str5cmp(m, 'T', 'R', 'A', 'C', 'E')) {
|
if (ngx_str5cmp(m, 'T', 'R', 'A', 'C', 'E')) {
|
||||||
r->method = NGX_HTTP_TRACE;
|
r->method = NGX_HTTP_TRACE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user