net: http_client: Set body_start pointer unconditionally
Set `body_start` pointer regardless of the body position in the recv buffer. In result, the pointer shall indicate correctly position of the body for each fragment, it's also explicit now that if the pointer is not set for a fragment, there's no body in that particular fragment. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
d002f8a524
commit
4557d183b9
1 changed files with 2 additions and 2 deletions
|
@ -264,8 +264,8 @@ static int on_body(struct http_parser *parser, const char *at, size_t length)
|
|||
req->internal.response.http_cb->on_body(parser, at, length);
|
||||
}
|
||||
|
||||
if (!req->internal.response.body_start &&
|
||||
(uint8_t *)at != (uint8_t *)req->internal.response.recv_buf) {
|
||||
/* Reset the body_start pointer for each fragment. */
|
||||
if (!req->internal.response.body_start) {
|
||||
req->internal.response.body_start = (uint8_t *)at;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue