Please sign in to comment.
only write the jar if the response isn't committed
when streaming responses, we need to make sure the cookie jar is written to the headers before returning up the stack. This commit introduces a new method on the response object that writes the cookie jar to the headers as the response is committed. The middleware and test framework will not write the cookie headers if the response has already been committed. fixes #14352
- Loading branch information...
Showing with 57 additions and 10 deletions.
- +8 −4 actionpack/lib/action_controller/metal/live.rb
- +15 −1 actionpack/lib/action_controller/test_case.rb
- +4 −0 actionpack/lib/action_dispatch/http/response.rb
- +16 −5 actionpack/lib/action_dispatch/middleware/cookies.rb
- +13 −0 actionpack/test/controller/live_stream_test.rb
- +1 −0 actionpack/test/dispatch/live_response_test.rb