Commit 7637e8f5 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Do not upgrade on already upgraded connections

parent 6583bdfc
...@@ -1635,7 +1635,7 @@ static void _handle_connection(void) ...@@ -1635,7 +1635,7 @@ static void _handle_connection(void)
upgrade = httpp_getvar(parser, "upgrade"); upgrade = httpp_getvar(parser, "upgrade");
connection = httpp_getvar(parser, "connection"); connection = httpp_getvar(parser, "connection");
if (upgrade && connection && strcasecmp(connection, "upgrade") == 0) { if (upgrade && connection && strcasecmp(connection, "upgrade") == 0) {
if (client->con->tlsmode == ICECAST_TLSMODE_DISABLED || strstr(upgrade, "TLS/1.0") == NULL) { if (client->con->tlsmode == ICECAST_TLSMODE_DISABLED || client->con->tls || strstr(upgrade, "TLS/1.0") == NULL) {
client_send_error_by_id(client, ICECAST_ERROR_CON_UPGRADE_ERROR); client_send_error_by_id(client, ICECAST_ERROR_CON_UPGRADE_ERROR);
continue; continue;
} else { } else {
......
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