Commit 5c5155b8 authored by Michael Smith's avatar Michael Smith

Only consider a path a candidate for file-serving if it exists AND is a normal

file (not a directory, etc.)

svn path=/trunk/icecast/; revision=4616
parent a971f994
...@@ -703,7 +703,8 @@ static void _handle_get_request(connection_t *con, ...@@ -703,7 +703,8 @@ static void _handle_get_request(connection_t *con,
free(fullpath); free(fullpath);
return; return;
} }
else if(fileserve && stat(fullpath, &statbuf) == 0) else if(fileserve && stat(fullpath, &statbuf) == 0 &&
S_ISREG(statbuf.st_mode))
{ {
fserve_client_create(client, fullpath); fserve_client_create(client, fullpath);
free(fullpath); free(fullpath);
......
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