mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 13:02:35 +00:00
HttpServer audio and thumbnail lookups explicitly only support GET -- I
think we were doing some unnecessary process with HEAD (and potentially OPTIONS) requests.
This commit is contained in:
parent
2f7fa348bf
commit
41f1020ac9
@ -318,6 +318,7 @@ int HttpServer::HandleRequest(
|
||||
int status = MHD_HTTP_NOT_FOUND;
|
||||
|
||||
try {
|
||||
if (method && std::string(method) == "GET") {
|
||||
if (!isAuthenticated(connection, server->context)) {
|
||||
status = 401; /* unauthorized */
|
||||
static const char* error = "unauthorized";
|
||||
@ -349,6 +350,7 @@ int HttpServer::HandleRequest(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user