Skip to content

Commit

Permalink
Change HTTPMethod::HEAD to HTTPMethod::Head, HTTPMethod::GET to
Browse files Browse the repository at this point in the history
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 ipkn/crow#307 for a similar issue.
  • Loading branch information
thinking-tower committed May 23, 2021
1 parent d4b4c08 commit 3bd1956
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/crow/routing.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, ";

Expand Down

0 comments on commit 3bd1956

Please sign in to comment.