Skip to content
Snippets Groups Projects
Commit 5d3de1ee authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

For the cases we'll send a Content-Length of zero, do not send content.

Should fix #223
Introduced in d56ba01f which likely fixed some stuff on the wiki.
parent bc7a0d7d
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1371 passed
......@@ -1286,6 +1286,9 @@ static BOOL send_headers(http_session_t *session, const char *status, int chunke
}
if (session->req.send_location) {
ret=-1;
if(session->req.dynamic!=IS_CGI && session->req.dynamic!=IS_FASTCGI && (!chunked) && (!session->req.manual_length)) {
session->req.send_content = FALSE;
}
switch (session->req.send_location) {
case MOVED_PERM:
status_line=error_301;
......@@ -1305,6 +1308,9 @@ static BOOL send_headers(http_session_t *session, const char *status, int chunke
if(stat_code==304 || stat_code==204 || (stat_code >= 100 && stat_code<=199)) {
session->req.send_content = FALSE;
}
if (!session->req.send_content) {
chunked=FALSE;
send_entity = FALSE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment