bozimmerman / CoffeeMud

Full featured, mature MUD supporting MSP, MXP, OLC, with a web server, mail server, and MORE!
Apache License 2.0
190 stars 99 forks source link

Malformed URL for siplet PlaySound if both MXP and MSP are enabled #50

Closed ObsidianDoom closed 1 year ago

ObsidianDoom commented 1 year ago

If BOTH MXP and MSP are enabled in a session the URL passed to the PlaySound function in termsupport.js is stripping out the forward slashes (apart from the last one) i.e. instead of http://mydomain:27744/sounds/ the url is http:mydomain:27744sounds/

So a fetch of "clap.wav" becomes http:mydomain:27744sounds/clap.wav which returns a 404 ( because the prefix is obviously malformed) and the sound is not played.

IF ONLY MSP is enabled and MXP is NOT enabled the URL passed to the PlaySound is correct (forward slashes are not stripped) and the sound is played i.e. http//:mydomain:27744/sounds/clap.wav

I have verified issue with server and client running on same computer and on separate computers. I have tried replacing mydomain by ip address. I have tried with the 5.10.0.2 and also latest commit from github - all have same issue.

I could not quite debug exactly where the problem was else I would have offered a solution not just a problem !

DOMAIN=mydomain SOUNDPATH=http://mydomain:27744/sounds/ MXPIMAGEPATH=http://mydomain:27744/images/mxp

Server: Coffemud 5.10.0.2, Windows 10, JDK 1.6.0_45, MySQL (community) 5.7.39 Client: Chrome 108.0.5359.72 (64 bit) Windows 10