Skip to content
Browse files

"Caching" middleware handles responses frozen by caching system

  • Loading branch information...
1 parent 57978b3 commit 9f9ec14fd207b4601b5617d9489798a3b2b774ea @mislav committed Apr 1, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/faraday_stack/caching.rb
View
1 lib/faraday_stack/caching.rb
@@ -37,6 +37,7 @@ def cache_on_complete(env)
end
def finalize_response(response, env)
+ response = env[:response] = response.dup if response.frozen?
response.apply_request env unless response.env[:method]
response
end

0 comments on commit 9f9ec14

Please sign in to comment.
Something went wrong with that request. Please try again.