From fd6b065a136abd7ba2ea9eb726140eb4fedc924d Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Wed, 28 Mar 2018 15:29:06 +0000 Subject: [PATCH] Feature: Allow the use of "Downgrade" when normally "Upgrade" would be the correct keyword --- src/connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index 7785bbf5..0309b13f 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1347,8 +1347,10 @@ static void _handle_connection(void) } upgrade = httpp_getvar(parser, "upgrade"); + if (upgrade == NULL) + upgrade = httpp_getvar(parser, "downgrade"); connection = httpp_getvar(parser, "connection"); - if (upgrade && connection && strcasecmp(connection, "upgrade") == 0) { + if (upgrade && connection && (strcasecmp(connection, "upgrade") == 0 || strcasecmp(connection, "downgrade") == 0)) { if (client->con->tlsmode != ICECAST_TLSMODE_DISABLED && strstr(upgrade, "TLS/1.0") != NULL) { client_send_101(client, ICECAST_REUSE_UPGRADETLS); continue;