Commit e099f80a authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Only report one Upgrade:-Header on upgrade

parent 789dd067
Pipeline #92 passed with stage
in 45 seconds
......@@ -682,13 +682,13 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
return -1;
if (client) {
if (client->con->tlsmode != ICECAST_TLSMODE_DISABLED)
upgrade_header = "Upgrade: TLS/1.0\r\n";
switch (client->reuse) {
case ICECAST_REUSE_CLOSE: connection_header = "Close"; break;
case ICECAST_REUSE_KEEPALIVE: connection_header = "Keep-Alive"; break;
case ICECAST_REUSE_UPGRADETLS: connection_header = "Upgrade"; break;
case ICECAST_REUSE_UPGRADETLS: connection_header = "Upgrade"; upgrade_header = ""; break;
}
if (client->con->tlsmode != ICECAST_TLSMODE_DISABLED)
upgrade_header = "Upgrade: TLS/1.0\r\n";
}
if (offset == -1)
......
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