mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-10 18:29:27 +00:00
httpd: Ignore remaining POST content in case of application error
This commit is contained in:
parent
346d2f8c8a
commit
b7b6373ca5
|
@ -1683,7 +1683,11 @@ http_post_rxpbuf(struct http_state *hs, struct pbuf *p)
|
||||||
hs->post_content_len_left -= p->tot_len;
|
hs->post_content_len_left -= p->tot_len;
|
||||||
}
|
}
|
||||||
err = httpd_post_receive_data(hs, p);
|
err = httpd_post_receive_data(hs, p);
|
||||||
if ((err != ERR_OK) || (hs->post_content_len_left == 0)) {
|
if (err != ERR_OK) {
|
||||||
|
/* Ignore remaining content in case of application error */
|
||||||
|
hs->post_content_len_left = 0;
|
||||||
|
}
|
||||||
|
if (hs->post_content_len_left == 0) {
|
||||||
#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND
|
#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND
|
||||||
if (hs->unrecved_bytes != 0) {
|
if (hs->unrecved_bytes != 0) {
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user