Skip to content
Snippets Groups Projects
Commit be412350 authored by deuce's avatar deuce
Browse files

If you need to append a trailing slash, send a MOVED_PERM response. This...

If you need to append a trailing slash, send a MOVED_PERM response.  This fixes broken requests like http://cvs.synchro.net/docs instead of
http://cvs.synchro.net/docs/
parent 8967124b
No related branches found
No related tags found
No related merge requests found
......@@ -1517,10 +1517,12 @@ static BOOL check_request(http_session_t * session)
if(isdir(path)) {
last_ch=*lastchar(path);
if(!IS_PATH_DELIM(last_ch)) {
session->req.send_location==MOVED_PERM;
strcat(path,"/");
}
last_ch=*lastchar(session->req.virtual_path);
if(!IS_PATH_DELIM(last_ch)) {
session->req.send_location==MOVED_PERM;
strcat(session->req.virtual_path,"/");
}
last_slash=find_last_slash(path);
......
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