Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add url escaping for queue names #26

Open
thousandsofthem opened this Issue · 1 comment

3 participants

@thousandsofthem
Collaborator

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
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.