lib/hurley/query.rb in hurley-0.1 vs lib/hurley/query.rb in hurley-0.2
- old
+ new
@@ -40,9 +40,10 @@
end
end
def parse_query(raw_query)
raw_query.to_s.split(AMP).each do |pair|
+ next if pair.empty?
escaped_key, escaped_value = pair.split(EQ, 2)
key = CGI.unescape(escaped_key)
value = escaped_value ? CGI.unescape(escaped_value) : nil
send(:decode_pair, key, value)
end