1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-16 06:15:24 +00:00

Feature: Allow the use of "Downgrade" when normally "Upgrade" would be the correct keyword

This commit is contained in:
Philipp Schafft 2018-03-28 15:29:06 +00:00
parent 51ff8567ff
commit fd6b065a13

View File

@ -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;