mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-09-22 16:53:47 +08:00
httpd: fix compiling last commit with LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN==0
This commit is contained in:
@@ -2131,12 +2131,12 @@ http_parse_request(struct pbuf *inp, struct http_state *hs, struct altcp_pcb *pc
|
|||||||
} else
|
} else
|
||||||
#endif /* LWIP_HTTPD_SUPPORT_POST */
|
#endif /* LWIP_HTTPD_SUPPORT_POST */
|
||||||
{
|
{
|
||||||
#if LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN
|
|
||||||
err_t err;
|
err_t err;
|
||||||
|
#if LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN
|
||||||
void *obj;
|
void *obj;
|
||||||
char replace_uri[LWIP_HTTPD_HEADERS_URI_REPLACE_LEN + 1];
|
char replace_uri[LWIP_HTTPD_HEADERS_URI_REPLACE_LEN + 1];
|
||||||
replace_uri[0] = 0;
|
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,
|
uri, replace_uri,
|
||||||
LWIP_HTTPD_HEADERS_URI_REPLACE_LEN);
|
LWIP_HTTPD_HEADERS_URI_REPLACE_LEN);
|
||||||
if (replace_uri[0] != 0) {
|
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);
|
err = http_find_file(hs, uri, is_09);
|
||||||
#if LWIP_HTTPD_HEADERS_AFTER_FILE_OPEN
|
#if LWIP_HTTPD_HEADERS_AFTER_FILE_OPEN
|
||||||
if (err == ERR_OK) {
|
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
|
#if LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN
|
||||||
, obj
|
, obj
|
||||||
#endif /* LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN */
|
#endif /* LWIP_HTTPD_HEADERS_BEFORE_FILE_OPEN */
|
||||||
|
|||||||
Reference in New Issue
Block a user