Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
9cbc110f
Commit
9cbc110f
authored
Nov 28, 2016
by
Philipp Schafft
🦁
Browse files
Fix: Do not announce Upgrade to TLS on TLS Mode DISABLED sockets
parent
a864fbf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util.c
View file @
9cbc110f
...
...
@@ -676,6 +676,7 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
ssize_t
ret
;
char
*
extra_headers
;
const
char
*
connection_header
=
"Close"
;
const
char
*
upgrade_header
=
""
;
if
(
!
out
)
return
-
1
;
...
...
@@ -686,6 +687,8 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
case
ICECAST_REUSE_KEEPALIVE
:
connection_header
=
"Keep-Alive"
;
break
;
case
ICECAST_REUSE_UPGRADETLS
:
connection_header
=
"Upgrade"
;
break
;
}
if
(
client
->
con
->
tlsmode
!=
ICECAST_TLSMODE_DISABLED
)
upgrade_header
=
"Upgrade: TLS/1.0
\r\n
"
;
}
if
(
offset
==
-
1
)
...
...
@@ -758,7 +761,7 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset,
connection_header
,
(
client
&&
client
->
admin_command
==
ADMIN_COMMAND_ERROR
?
"GET, SOURCE"
:
"GET"
),
(
config
->
tls_ok
?
"Upgrade: TLS/1.0
\r\n
"
:
""
)
,
upgrade_header
,
currenttime_buffer
,
contenttype_buffer
,
(
status
==
401
?
"WWW-Authenticate: Basic realm=
\"
Icecast2 Server
\"\r\n
"
:
""
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment