mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
httpd: ensure hs->keepalive is 0 if content length is not sent
Connections for custom files without the persistent flag were not closed without this change. Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
053a5e6e13
commit
1a75112b47
@ -957,6 +957,7 @@ get_http_headers(struct http_state *hs, const char *uri)
|
||||
hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_KEEPALIVE_LEN];
|
||||
} else {
|
||||
hs->hdrs[HDR_STRINGS_IDX_CONTENT_LEN_KEEPALIVE] = g_psHTTPHeaderStrings[HTTP_HDR_CONN_CLOSE];
|
||||
hs->keepalive = 0;
|
||||
}
|
||||
#else /* LWIP_HTTPD_SUPPORT_11_KEEPALIVE */
|
||||
if (add_content_len) {
|
||||
|
Loading…
Reference in New Issue
Block a user