mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
In file (any serialized) store need to response.finish! on get
This commit is contained in:
parent
055ee47b83
commit
28399f1b88
@ -129,6 +129,7 @@ module HTTPX::Plugins
|
||||
|
||||
response = request.options.response_class.new(request, status, version, response_headers)
|
||||
response.original_request = original_request
|
||||
response.finish!
|
||||
|
||||
::IO.copy_stream(f, response.body)
|
||||
|
||||
|
@ -15,6 +15,13 @@ class ResponseCacheFileStoreTest < Minitest::Test
|
||||
assert File.exist?(store.dir.join(request.response_cache_key))
|
||||
end
|
||||
|
||||
def test_finished
|
||||
request = make_request("GET", "http://store-cache/")
|
||||
cached_response(request)
|
||||
response = store.get(request)
|
||||
assert response.finished?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def store_class
|
||||
|
Loading…
x
Reference in New Issue
Block a user