-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie having a Domain cookie-attribute with empty string fails to be added to the cookie jar #6245
Comments
The issue is that the import requests
from http import cookiejar
class DangerouslyAllowEverything(cookiejar.CookiePolicy):
def set_ok(self, *args, **kwargs):
return True
netscape = True
rfc2965 = False
session = requests.session()
session.cookies.set_policy(DangerouslyAllowEverything())
response = session.get("http://localhost") |
Using requests to access an API hosted on an application server we noticed that cookies were not added to the cookie jar in the session.
It seems that after an upgrade to the application server framework it adds a
domain=;
cookie-attribute to the cookies in the response.Expected Result
The cookie to be added to the jar
Actual Result
The cookie is dropped.
Reproduction Steps
Requirements:
PyHamcrest==2.0.2
requests==2.28.1
System Information
The text was updated successfully, but these errors were encountered: