summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_parse.c
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
commit69235c513277c64b513447d9b92c3c03d616f577 (patch)
tree0780c92ba28d92b547c85ea0bee5e3040e14dee2 /src/nxt_http_parse.c
parentb9bc222021e77bbdfb12576b3e315b962cf6b399 (diff)
parentfaf97dc06058de1c929af33a68adb34d3932b374 (diff)
downloadunit-1.30.0-1.tar.gz
unit-1.30.0-1.tar.bz2
Merged with the default branch.1.30.0-1
Diffstat (limited to '')
-rw-r--r--src/nxt_http_parse.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c
index f39d8f67..50cbda2b 100644
--- a/src/nxt_http_parse.c
+++ b/src/nxt_http_parse.c
@@ -19,8 +19,6 @@ static u_char *nxt_http_lookup_field_end(u_char *p, const u_char *end);
static nxt_int_t nxt_http_parse_field_end(nxt_http_request_parse_t *rp,
u_char **pos, const u_char *end);
-static nxt_int_t nxt_http_parse_complex_target(nxt_http_request_parse_t *rp);
-
static nxt_int_t nxt_http_field_hash_test(nxt_lvlhsh_query_t *lhq, void *data);
static nxt_int_t nxt_http_field_hash_collision(nxt_lvlhsh_query_t *lhq,
@@ -417,23 +415,25 @@ space_after_target:
{
rp->version.ui64 = ver.ui64;
- if (nxt_fast_path(p[9] == '\r')) {
- p += 10;
+ p += 9;
+ if (nxt_fast_path(*p == '\r')) {
- if (nxt_slow_path(p == end)) {
+ if (nxt_slow_path(p + 1 == end)) {
return NXT_AGAIN;
}
- if (nxt_slow_path(*p != '\n')) {
+ if (nxt_slow_path(p[1] != '\n')) {
return NXT_HTTP_PARSE_INVALID;
}
- *pos = p + 1;
+ *pos = p + 2;
} else {
- *pos = p + 10;
+ *pos = p + 1;
}
+ rp->request_line_end = p;
+
if (rp->complex_target != 0
#if 0
|| rp->quoted_target != 0
@@ -852,7 +852,7 @@ static const uint8_t nxt_http_normal[32] nxt_aligned(32) = {
};
-static nxt_int_t
+nxt_int_t
nxt_http_parse_complex_target(nxt_http_request_parse_t *rp)
{
u_char *p, *u, c, ch, high, *args;