cid#368508 COPY_INSTEAD_OF_MOVE

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Icd74082ef6c32c9c0e266dc876a67675d95e7edf
pull/9103/head
Caolán McNamara 2024-05-19 12:33:19 +01:00
parent 7ed490700b
commit b97922f18c
1 changed files with 1 additions and 2 deletions

View File

@ -1999,11 +1999,10 @@ static std::string getCapabilitiesJson(bool convertToAvailable)
static void sendCapabilities(bool convertToAvailable,
const std::shared_ptr<StreamSocket>& socket)
{
std::string capabilities = getCapabilitiesJson(convertToAvailable);
http::Response httpResponse(http::StatusCode::OK);
FileServerRequestHandler::hstsHeaders(httpResponse);
httpResponse.set("Last-Modified", Util::getHttpTimeNow());
httpResponse.setBody(capabilities, "application/json");
httpResponse.setBody(getCapabilitiesJson(convertToAvailable), "application/json");
httpResponse.set("X-Content-Type-Options", "nosniff");
socket->sendAndShutdown(httpResponse);
LOG_INF("Sent capabilities.json successfully.");