diff --git a/lib/capybara/webmock/proxy.rb b/lib/capybara/webmock/proxy.rb index 51bb751..7db2e97 100644 --- a/lib/capybara/webmock/proxy.rb +++ b/lib/capybara/webmock/proxy.rb @@ -9,6 +9,11 @@ def initialize(pid) ensure_log_exists end + def call(env) + @streaming = true + super + end + def perform_request(env) request = Rack::Request.new(env) allowed_urls = ['127.0.0.1', 'localhost', %r{(.*\.|\A)lvh.me}] @@ -24,6 +29,12 @@ def self.remove_pid File.delete(PID_FILE) if File.exist?(PID_FILE) end + def rewrite_response(triplet) + status, headers, body = triplet + headers.delete "transfer-encoding" + triplet + end + private def allowed_url?(urls, host) diff --git a/lib/capybara/webmock/version.rb b/lib/capybara/webmock/version.rb index 66c6dd9..5e6dd8c 100644 --- a/lib/capybara/webmock/version.rb +++ b/lib/capybara/webmock/version.rb @@ -1,5 +1,5 @@ module Capybara module Webmock - VERSION = "0.4.0" + VERSION = "0.4.1" end end