Skip to content

Commit

Permalink
net: lib: http_server: Fix dynamic HTTP post zero 0 length reply
Browse files Browse the repository at this point in the history
Fix issue in http server that a http post
was unable to send a 0 length reply.

Signed-off-by: Henrik Maier <[email protected]>
  • Loading branch information
hwmaier authored and aescolar committed Jun 20, 2024
1 parent 23736ee commit abeae8f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions subsys/net/lib/http/http_server_http1.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,10 @@ static int dynamic_post_req(struct http_resource_detail_dynamic *dynamic_detail,
}

(void)http_server_sendall(client, crlf, 2);

offset += copy_len;
remaining -= copy_len;
}

offset += copy_len;
remaining -= copy_len;
copy_len = MIN(remaining, dynamic_detail->data_buffer_len);
}

Expand Down

0 comments on commit abeae8f

Please sign in to comment.