httpd: fix compiling last commit with LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN==0

This commit is contained in:
Simon Goldschmidt
2026-05-08 21:54:16 +02:00
parent 5a0007f083
commit d82e428723

View File

@@ -2131,12 +2131,12 @@ http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pc
} else
#endif /* LWIP_HTTPD_SUPPORT_POST */
{
#if LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN
err_t err;
#if LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN
void *obj;
char replace_uri[LWIP_HTTPD_HEADERS_URI_REPLACE_LEN + 1];
replace_uri[0] = 0;
obj = httpd_headers_before_file_open(crlf + 2, data_len - (crlf + 2 - data),
obj = httpd_headers_before_file_open(crlf + 2, (uint16_t)(data_len - (crlf + 2 - data)),
uri, replace_uri,
LWIP_HTTPD_HEADERS_URI_REPLACE_LEN);
if (replace_uri[0] != 0) {
@@ -2146,7 +2146,7 @@ http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pc
err = http_find_file(hs, uri, is_09);
#if LWIP_HTTPD_HEADERS_AFTER_FILE_OPEN
if (err == ERR_OK) {
httpd_headers_after_file_open(hs->handle, crlf + 2, data_len - (crlf + 2 - data)
httpd_headers_after_file_open(hs->handle, crlf + 2, (uint16_t)(data_len - (crlf + 2 - data))
#if LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN
, obj
#endif /* LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN */