eric-fakeweb 1.2.2.3 → 1.2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fake_web/ext/net_http.rb +1 -1
- data/lib/fake_web/responder.rb +4 -2
- metadata +1 -1
@@ -65,7 +65,7 @@ module Net #:nodoc: all
|
|
65
65
|
elsif FakeWeb.allow_net_connect?
|
66
66
|
connect_without_fakeweb
|
67
67
|
res = request_without_fakeweb(request, body, &block)
|
68
|
-
after_unhandled_request(uri, request, res, @socket.full_rbuf)
|
68
|
+
after_unhandled_request(uri, request, res, @socket && @socket.full_rbuf)
|
69
69
|
res
|
70
70
|
else
|
71
71
|
raise FakeWeb::NetConnectNotAllowedError,
|
data/lib/fake_web/responder.rb
CHANGED
@@ -61,7 +61,9 @@ module FakeWeb
|
|
61
61
|
}
|
62
62
|
|
63
63
|
# read the body of response.
|
64
|
-
|
64
|
+
unless options[:raw]
|
65
|
+
r.instance_eval { @header['transfer-encoding'] = nil }
|
66
|
+
end
|
65
67
|
r.reading_body(socket, true) {}
|
66
68
|
|
67
69
|
# Delete the transfer-encoding key from r.@header if there wasn't one,
|
@@ -96,4 +98,4 @@ module FakeWeb
|
|
96
98
|
end
|
97
99
|
|
98
100
|
end
|
99
|
-
end
|
101
|
+
end
|