Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 5d3de1ee authored by Deucе's avatar Deucе 👌🏾

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
Pipeline #1371 passed with stage
in 10 minutes and 14 seconds
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment