Commit 68248d15 authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Fix: Also check for Connection:-Header

parent 71408e62
...@@ -1423,7 +1423,7 @@ static void _handle_connection(void) ...@@ -1423,7 +1423,7 @@ static void _handle_connection(void)
} }
if (already_parsed || httpp_parse (parser, client->refbuf->data, node->offset)) { if (already_parsed || httpp_parse (parser, client->refbuf->data, node->offset)) {
char *uri; char *uri;
const char *upgrade; const char *upgrade, *connection;
/* we may have more than just headers, so prepare for it */ /* we may have more than just headers, so prepare for it */
if (node->stream_offset == node->offset) { if (node->stream_offset == node->offset) {
...@@ -1451,7 +1451,8 @@ static void _handle_connection(void) ...@@ -1451,7 +1451,8 @@ static void _handle_connection(void)
} }
upgrade = httpp_getvar(parser, "upgrade"); upgrade = httpp_getvar(parser, "upgrade");
if (upgrade && strstr(upgrade, "TLS/1.0") != NULL) { connection = httpp_getvar(parser, "connection");
if (upgrade && connection && strstr(upgrade, "TLS/1.0") != NULL && strcasecmp(connection, "upgrade") == 0) {
client_send_101(client, ICECAST_REUSE_UPGRADETLS); client_send_101(client, ICECAST_REUSE_UPGRADETLS);
continue; continue;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment