notandy / ympd

Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS
http://www.ympd.org
GNU General Public License v2.0
523 stars 144 forks source link

Fix double slashes in websocket URL #134

Closed Kernald closed 6 years ago

Kernald commented 8 years ago

Some proxies (like Træfik) send a 301 redirect when requesting ws://hostname.fqdn//ws, redirecting to ws://hostname.fqdn/ws. For a weird reason (I don't know the real explanation behind that behavior), Firefox (at least) fails to follow the 301 redirect to the web-socket endpoint. So here's a little patch which avoid putting a double / in the web-socket endpoint URL.