Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where SSL websockets wouldn't run due to HTTP upgrade #393

Merged
merged 2 commits into from
Apr 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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")
The-EDev marked this conversation as resolved.
Show resolved Hide resolved
{
// TODO(ipkn): HTTP/2
// currently, ignore upgrade header
}
#endif
else
{
close_connection_ = true;
Expand Down