Skip to content
Browse files

using rack utils to build querystring

  • Loading branch information...
1 parent 544b867 commit b7fd99e9f8d0fd0cffc9d2c71eccf00f978903ba @joshbuddy committed May 4, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/rack_rewrite/actions.rb
View
3 lib/rack_rewrite/actions.rb
@@ -1,5 +1,4 @@
require 'rack'
-require 'cgi'
module Rack
class Rewrite
@@ -17,7 +16,7 @@ def query_string=(params)
env = @request.env
env['QUERY_STRING'] = case params
when Hash
- params.inject([]) { |qs, (k, v)| qs << "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}"} * '&'
+ Rack::Utils.build_query(params)
else
params
end

0 comments on commit b7fd99e

Please sign in to comment.
Something went wrong with that request. Please try again.