summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_chunk_parse.c
diff options
context:
space:
mode:
authoroxpa <iippolitov@gmail.com>2024-09-17 14:21:10 +0100
committeroxpa <iippolitov@gmail.com>2024-09-17 14:21:10 +0100
commit2417826d8bebf921ee1be102ef8ce702f0683d66 (patch)
tree76d29a1705415ed7368870826dbb2f04942ee794 /src/nxt_http_chunk_parse.c
parent0e79d961bb1ea68674961da1703ffedb1ddf6e43 (diff)
parent24ed91f40634372d99f67f0e4e3c2ac0abde81bd (diff)
downloadunit-2417826d8bebf921ee1be102ef8ce702f0683d66.tar.gz
unit-2417826d8bebf921ee1be102ef8ce702f0683d66.tar.bz2
Merge tag '1.33.0' into packaging.
Unit 1.33.0 release.
Diffstat (limited to 'src/nxt_http_chunk_parse.c')
-rw-r--r--src/nxt_http_chunk_parse.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nxt_http_chunk_parse.c b/src/nxt_http_chunk_parse.c
index b60bc801..a43ce75b 100644
--- a/src/nxt_http_chunk_parse.c
+++ b/src/nxt_http_chunk_parse.c
@@ -48,9 +48,7 @@ nxt_http_chunk_parse(nxt_task_t *task, nxt_http_chunk_parse_t *hcp,
for (b = in; b != NULL; b = next) {
- hcp->pos = b->mem.pos;
-
- while (hcp->pos < b->mem.free) {
+ while (b->mem.pos < b->mem.free) {
/*
* The sw_chunk state is tested outside the switch
* to preserve hcp->pos and to not touch memory.
@@ -76,7 +74,7 @@ nxt_http_chunk_parse(nxt_task_t *task, nxt_http_chunk_parse_t *hcp,
/* ret == NXT_HTTP_CHUNK_END */
}
- ch = *hcp->pos++;
+ ch = *b->mem.pos++;
switch (state) {
@@ -203,7 +201,7 @@ nxt_http_chunk_buffer(nxt_http_chunk_parse_t *hcp, nxt_buf_t ***tail,
size_t size;
nxt_buf_t *b;
- p = hcp->pos;
+ p = in->mem.pos;
size = in->mem.free - p;
b = nxt_buf_mem_alloc(hcp->mem_pool, 0, 0);
@@ -224,7 +222,7 @@ nxt_http_chunk_buffer(nxt_http_chunk_parse_t *hcp, nxt_buf_t ***tail,
if (hcp->chunk_size < size) {
p += hcp->chunk_size;
- hcp->pos = p;
+ in->mem.pos = p;
b->mem.free = p;
b->mem.end = p;