Change HTTPMethod::HEAD to HTTPMethod::Head, HTTPMethod::GET to

HTTPMethod::Get and HTTPMethod::OPTIONS to HTTPMethod::Options.

VS2019 error:
enum "crow::HTTPMethod" has no member "HEAD"
enum "crow::HTTPMethod" has no member "GET"
enum "crow::HTTPMethod" has no member "OPTIONS"

See https://github.com/ipkn/crow/pull/307 for a similar issue.
This commit is contained in:
Darius Tan 2021-05-23 19:58:01 +12:00
parent d4b4c089bf
commit 3bd1956e90

View File

@ -1186,12 +1186,12 @@ namespace crow
HTTPMethod method_actual = req.method;
if (req.method >= HTTPMethod::InternalMethodCount)
return;
else if (req.method == HTTPMethod::HEAD)
else if (req.method == HTTPMethod::Head)
{
method_actual = HTTPMethod::GET;
method_actual = HTTPMethod::Get;
res.is_head_response = true;
}
else if (req.method == HTTPMethod::OPTIONS)
else if (req.method == HTTPMethod::Options)
{
std::string allow = "OPTIONS, HEAD, ";