Should Icecast use $hostname instead of the value from the GET request for replies?
Icecast uses the hostname supplied by the client in HTTP headers for replies. Should it use the hostname set in the config instead?
Target is 2.4.0
after some discussion on IRC:
It is apparent that the current behaviour is well suited as general purpose default. (This e.g. prevents breaking in LAN/NAT/Internet setups or when the server is being accessed on different IPs and or different host names)
I am still of the opinion that there are several cases where being able to optionally override the hostname used in dynamic replies by the one set in the config does make sense.
- reverse proxies (although not recommended) might access the icecast server by only internally resolving host-names. This would deliver the client a broken generated playlist file.
- some server admins want to force a single and specific host name to be returned by the server (e.g. to ensure RRDNS, to avoid unauthorized 3rd parties defining FQDN for the server and having the server return that unauthorized FQDN in dynamic playlists)
- http vs. https scenarios might break things too (e.g. different server/proxy/request-routing per port). listenurl is always http