Closed marclennox closed 7 years ago
Certainly - please add some tests too.
URIs aren't part of any official specification at the moment, but there is this Wiki page: https://github.com/mqtt/mqtt.github.io/wiki/URI-Scheme
It might be worth updating/clarifying in that.
I have fixed username/password unescaping in 333087777c015837311d71c4144fa716c028f551.
I am a bit confused why ruby doesn't do this in URI.parse.
But there is a test to verify that this doesn't change/break.
Hey @njh, thanks for this! This was on my list to get done, just hadn't got around to it yet. I totally agree though, this seems like something that URI.parse should handle.
I'm trying to use the URI connection format with username and password in the URI, however if the username or password contain special characters, my understanding is that you are supposed to CGI escape them (percent escape).
It seems though that this library does not decode the username and password, so authentication fails.
Would you accept a PR that de-escapes them?