-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
When client-level CookieContainer
got back to the options, the code to add cookie headers changed. It adds the cookie header from request cookies, and then adds the cookie header from the client-level container.
Because headers is a dictionary, adding the Set-Cookie
header for the second time results in overriding it. As a result, if the client-level cookie container has cookies, it overrides request-level cookies.
To fix this, the code that adds the cookie header needs to check if any Set-Cookie
header is already present in the headers collection, and combine both if that's the case.