Skip to content

Commit

Permalink
[3.5] Send custom per-request cookies even if session jar is empty (#…
Browse files Browse the repository at this point in the history
…3515) (#3516)

* Send custom per-request cookies even if session jar is empty

* Add changenote
(cherry picked from commit a86af67)

Co-authored-by: Andrew Svetlov <[email protected]>
  • Loading branch information
asvetlov authored Jan 10, 2019
1 parent 4cf59e5 commit 587da16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/3515.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Send custom per-request cookies even if session jar is empty
2 changes: 1 addition & 1 deletion aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ async def _request(
tmp_cookie_jar = CookieJar()
tmp_cookie_jar.update_cookies(cookies)
req_cookies = tmp_cookie_jar.filter_cookies(url)
if session_cookies and req_cookies:
if req_cookies:
session_cookies.load(req_cookies)

cookies = session_cookies
Expand Down

0 comments on commit 587da16

Please sign in to comment.