Fixed favicon requests
This commit is contained in:
parent
e439138146
commit
bf82cfdee8
12
src/main.c
12
src/main.c
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue