mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
handle the most frequent case first
This commit is contained in:
parent
a724100799
commit
e23b4849b5
@ -120,6 +120,12 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
/* space* before URI */
|
/* space* before URI */
|
||||||
case sw_spaces_before_uri:
|
case sw_spaces_before_uri:
|
||||||
|
|
||||||
|
if (ch == '/' ){
|
||||||
|
r->uri_start = p;
|
||||||
|
state = sw_after_slash_in_uri;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
c = (u_char) (ch | 0x20);
|
c = (u_char) (ch | 0x20);
|
||||||
if (c >= 'a' && c <= 'z') {
|
if (c >= 'a' && c <= 'z') {
|
||||||
r->schema_start = p;
|
r->schema_start = p;
|
||||||
@ -128,10 +134,6 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '/':
|
|
||||||
r->uri_start = p;
|
|
||||||
state = sw_after_slash_in_uri;
|
|
||||||
break;
|
|
||||||
case ' ':
|
case ' ':
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user