lib/rack/http_streaming_response.rb in rack-proxy-0.5.1 vs lib/rack/http_streaming_response.rb in rack-proxy-0.5.2

- old
+ new

@@ -8,25 +8,27 @@ def initialize(request, host, port = nil) @request, @host, @port = request, host, port end - def status + def body + self + end + + def code response.code.to_i end + # #status is deprecated + alias_method :status, :code def headers h = Utils::HeaderHash.new response.to_hash.each do |k, v| h[k] = v end h - end - - def body - self end # Can be called only once! def each(&block) response.read_body(&block)