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:
casey langen 2017-11-12 20:48:15 -08:00
parent 2f7fa348bf
commit 41f1020ac9

View File

@ -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 (...) {
}