Skip to content
Snippets Groups Projects
Commit 2a6e4679 authored by rswindell's avatar rswindell
Browse files

Sends 0-length content header.

parent a9a5c0b8
No related branches found
No related tags found
No related merge requests found
...@@ -571,7 +571,9 @@ BOOL send_headers(http_session_t *session, const char *status) ...@@ -571,7 +571,9 @@ BOOL send_headers(http_session_t *session, const char *status)
,get_header(HEAD_LASTMODIFIED) ,get_header(HEAD_LASTMODIFIED)
,days[t->tm_wday],t->tm_mday,months[t->tm_mon] ,days[t->tm_wday],t->tm_mday,months[t->tm_mon]
,t->tm_year+1900,t->tm_hour,t->tm_min,t->tm_sec); ,t->tm_year+1900,t->tm_hour,t->tm_min,t->tm_sec);
} } else
sockprintf(session->socket,"%s: 0",get_header(HEAD_LENGTH));
sendsocket(session->socket,newline,2); sendsocket(session->socket,newline,2);
return(send_file); return(send_file);
} }
...@@ -956,9 +958,8 @@ static BOOL check_request(http_session_t * session) ...@@ -956,9 +958,8 @@ static BOOL check_request(http_session_t * session)
return(FALSE); return(FALSE);
} }
if(!fexist(path)) { if(!fexist(path)) {
if(path[strlen(path)-1]!='/') { if(*lastchar(path)!='/')
strcat(path,"/"); strcat(path,"/");
}
strcat(path,startup->index_file_name); strcat(path,startup->index_file_name);
session->req.send_location=TRUE; session->req.send_location=TRUE;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment