From ca0395c5ae54273b4fd542ef25b57d4b759678f8 Mon Sep 17 00:00:00 2001 From: Mike Kleshov Date: Wed, 2 Apr 2025 10:22:43 +0300 Subject: [PATCH] Revert "Apply patch #10511: remove code with no effect in httpd.c" This reverts commit f877b457a1bb759d48567326ec020be7e3a3d989. --- src/apps/http/httpd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apps/http/httpd.c b/src/apps/http/httpd.c index 48a4733d..cf3abacf 100644 --- a/src/apps/http/httpd.c +++ b/src/apps/http/httpd.c @@ -2118,6 +2118,12 @@ http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pc struct pbuf *q = inp; #endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ err = http_post_request(q, hs, data, data_len, uri, sp2); + if (err != ERR_OK) { + /* restore header for next try */ + *sp1 = ' '; + *sp2 = ' '; + uri[uri_len] = ' '; + } if (err == ERR_ARG) { goto badrequest; }