Skip to content

Commit

Permalink
fixed issue where SSL websockets wouldn't run due to HTTP upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
The-EDev committed Apr 7, 2022
1 parent 2b45f02 commit 0a739b3
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions include/crow/http_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,27 +129,12 @@ namespace crow
}
if (req.upgrade)
{
#ifdef CROW_ENABLE_SSL
if (handler_->ssl_used())
{
if (req.get_header_value("upgrade") == "h2")
{
// TODO(ipkn): HTTP/2
// currently, ignore upgrade header
}
}
else if (req.get_header_value("upgrade") == "h2c")
{
// TODO(ipkn): HTTP/2
// currently, ignore upgrade header
}
#else
if (req.get_header_value("upgrade") == "h2c")
// h2 or h2c headers
if (req.get_header_value("upgrade").substr(0, 2) == "h2")
{
// TODO(ipkn): HTTP/2
// currently, ignore upgrade header
}
#endif
else
{
close_connection_ = true;
Expand Down

0 comments on commit 0a739b3

Please sign in to comment.