Antti / rust-amqp

AMQP client in pure rust. Corresponds to rabbitmq spec.
MIT License
247 stars 45 forks source link

Remove leading / from the vhost #9

Closed divarvel closed 9 years ago

divarvel commented 9 years ago

Fixes #8

As per the AMQP uri spec https://www.rabbitmq.com/uri-spec.html

The vhost component of the URI does not include the leading "/"
character from the path.

and

Any percent-encoded octets in the vhost should be decoded before
it is passed to the server.
divarvel commented 9 years ago

TAnother point, I wanted to extract the url_string -> Options code in a separate function to be able to test it, but all the &str values in Options make that hard. A solution would be to have Strings instead, but I'm not really sure about it.