lib/em-http/http_encoding.rb in em-http-request-1.0.0.beta.3 vs lib/em-http/http_encoding.rb in em-http-request-1.0.0.beta.4

- old
+ new

@@ -61,10 +61,10 @@ query.map { |k, v| encode_param(k, v) }.join('&') else query.to_s end - if !uri.query.to_s.empty? + if uri && !uri.query.to_s.empty? encoded_query = [encoded_query, uri.query].reject {|part| part.empty?}.join("&") end encoded_query.to_s.empty? ? uri.path : "#{uri.path}?#{encoded_query}" end