karpach / remote-shutdown-pc

Remote Shutdown Manager is a windows application, which gives an ability to shutdown, suspend, hibernate PC or turn screen off using HTTP GET request.
326 stars 47 forks source link

Comparing to Internal Name of Command in void GetCommandType(...) #27

Closed zLeqitEclipse closed 1 year ago

zLeqitEclipse commented 1 year ago

This PR fixes (what it seems to me) a glitch which causes the URL argument to be invalid on Commands that have spaces in their Display Name.

For example: "Force Shutdown" (Display name) "ForceShutdown" (internal name)

The Documentation states an URL for ForceShutdown to be like this: http://remote-host-name:5001/secret/ForceShutdown

Unfortunately, this doesn't work because the Display name expects a space in between "Force" and "Shutdown".

So this is the URL that actually works in this case: http://remote-host-name:5001/secret/Force%20Shutdown

But my PR is fixing this issue so the Command in the Documentation works as expected.