From 493a97f4f3caa43d1c86c4d6b0f67602fd1b7185 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 15 Feb 2019 15:24:02 +0100 Subject: [PATCH] EnsureAcceptHeader(): fix wrong condition --- lib/remote/httpserverconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp index 7ea206f5f..a37b3a0b1 100644 --- a/lib/remote/httpserverconnection.cpp +++ b/lib/remote/httpserverconnection.cpp @@ -181,7 +181,7 @@ bool EnsureAcceptHeader( { namespace http = boost::beast::http; - if (request.method() == http::verb::get && request[http::field::accept] != "application/json") { + if (request.method() != http::verb::get && request[http::field::accept] != "application/json") { response.result(http::status::bad_request); response.set(http::field::content_type, "text/html"); response.body() = "

Accept header is missing or not set to 'application/json'.

"; -- 2.50.1