lib/tap/http/utils.rb in tap-http-0.3.2 vs lib/tap/http/utils.rb in tap-http-0.4.0
- old
+ new
@@ -111,11 +111,11 @@
end
params[key] = splat(values)
end if req.query
- { :url => headers['Host'] ? File.join("http://", headers['Host'], req.path_info) : req.path_info,
+ { :uri => headers['Host'] ? File.join("http://", headers['Host'], req.path_info) : req.path_info,
:request_method => req.request_method,
:version => req.http_version.to_s,
:headers => headers,
:params => params}
end
@@ -196,19 +196,9 @@
def headerize(str)
str.to_s.gsub(/\s|-/, "_").split("_").collect do |s|
s =~ /^(.)(.*)/
$1.upcase + $2.downcase
end.join("-")
- end
-
- # Inflates (ie unzips) a gzip string, as may be returned by requests
- # that accept 'gzip' and 'deflate' content encoding.
- #
- #--
- # Utils.inflate(res.body) if res['content-encoding'] == 'gzip'
- #
- def inflate(str)
- Zlib::GzipReader.new( StringIO.new( str ) ).read
end
EOL = Rack::Utils::Multipart::EOL
# Lifted from Rack::Utils::Multipart, and modified to collect
# overloaded params and params with names suffixed by '[]' as
\ No newline at end of file