Fixed favicon requests

This commit is contained in:
Thomas Kolb 2013-08-19 23:04:06 +02:00
parent e439138146
commit bf82cfdee8
1 changed files with 6 additions and 6 deletions

View File

@ -428,6 +428,12 @@ static int connection_handler(void * cls,
return MHD_NO;
}
// serv the favicon, if requested
if(strcmp(url, "/favicon.png") == 0) {
LOG(LVL_INFO, "Serving FavIcon request.");
return MHD_queue_response(connection, MHD_HTTP_OK, faviconResponse);
}
// check if url contains a "/.." sequence. If so, block the request as it is
// trying to access the parent directory (and may be an attempt to leave the
// shared space.
@ -456,12 +462,6 @@ static int connection_handler(void * cls,
return MHD_NO; // upload data in a GET!?
}
// serv the favicon, if requested
if(strcmp(url, "/favicon.png") == 0) {
LOG(LVL_INFO, "Serving FavIcon request.");
return MHD_queue_response(connection, MHD_HTTP_OK, faviconResponse);
}
if(S_ISREG(connstate->targetStat.st_mode)) {
return serv_regular_file(connection, connstate);
} else if(S_ISDIR(connstate->targetStat.st_mode)) {