We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd3bdc3 commit bc3a742Copy full SHA for bc3a742
include/crow/http_connection.h
@@ -129,27 +129,12 @@ namespace crow
129
}
130
if (req.upgrade)
131
{
132
-#ifdef CROW_ENABLE_SSL
133
- if (handler_->ssl_used())
134
- {
135
- if (req.get_header_value("upgrade") == "h2")
136
137
- // TODO(ipkn): HTTP/2
138
- // currently, ignore upgrade header
139
- }
140
141
- else if (req.get_header_value("upgrade") == "h2c")
142
143
144
145
146
-#else
147
- if (req.get_header_value("upgrade") == "h2c")
+ // h2 or h2c headers
+ if (req.get_header_value("upgrade").substr(0, 2) == "h2")
148
149
// TODO(ipkn): HTTP/2
150
// currently, ignore upgrade header
151
152
-#endif
153
else
154
155
close_connection_ = true;
0 commit comments