summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_http_parse.c')
-rw-r--r--src/nxt_http_parse.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c
index f39d8f67..439993df 100644
--- a/src/nxt_http_parse.c
+++ b/src/nxt_http_parse.c
@@ -417,23 +417,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