Add url escaping for queue names #26

Closed
thousandsofthem opened this Issue Oct 20, 2012 · 3 comments

Projects

None yet

4 participants

@thousandsofthem
Iron.io member

atm queue names not encoded at all,
e.g. https://github.com/iron-io/iron_mq_ruby/blob/master/lib/iron_mq/messages.rb#L11

They should be escaped via CGI.escape or ,better, Rack::Utils.escape

@treeder treeder closed this in 22e2e00 Oct 22, 2012
@manveru

That's not what we want, we want to use either Rack::Utils.escape (which contains backports for up to 1.8).
If we don't care about Ruby versions prior to 1.9.3p125, we can use URI.encode_www_form_component(s).gsub('+', '%20') directly for that path components, and URI.encode_www_form_component(s) for query components.

Otherwise we send spaces as + and that leads to a lot of confusion.

References are:

If we don't want to have a dependency on Rack, I can copy the code over, since we probably want 1.8 compatibility still.

@manveru manveru reopened this Nov 27, 2012
@nikhilm

Is this still valid? 3 years old :)

@thousandsofthem
Iron.io member

fixed eternity ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment