From 2a6e4679c7042b11377f97e62b5dc21e24547981 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 8 Aug 2002 10:37:47 +0000 Subject: [PATCH] Sends 0-length content header. --- src/sbbs3/websrvr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sbbs3/websrvr.c b/src/sbbs3/websrvr.c index d9967ead93..7afaaa32be 100644 --- a/src/sbbs3/websrvr.c +++ b/src/sbbs3/websrvr.c @@ -571,7 +571,9 @@ BOOL send_headers(http_session_t *session, const char *status) ,get_header(HEAD_LASTMODIFIED) ,days[t->tm_wday],t->tm_mday,months[t->tm_mon] ,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); return(send_file); } @@ -956,9 +958,8 @@ static BOOL check_request(http_session_t * session) return(FALSE); } if(!fexist(path)) { - if(path[strlen(path)-1]!='/') { + if(*lastchar(path)!='/') strcat(path,"/"); - } strcat(path,startup->index_file_name); session->req.send_location=TRUE; } -- GitLab