-
Notifications
You must be signed in to change notification settings - Fork 1k
urequests.request(): unique headers only (dict keys) #615
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
Comments
Do you mean you also want to be able to make a request with multiple set-cookie headers? This duplicate header issue is discussed pretty regularly, both in regular python and here (#217 (comment)) |
It is my understanding that for multiple cookies, multiple |
Ah, it seems cookies are concatenated via semicolon (Wikipedia), so for the request, one |
This concatenates the above array of response
"Works for me!" ;-) Now I need to figure out how to parse 50 kB of HTML.. |
|
It seems that a fix was found. So I believe this issue can be closed? |
Agreed. @gnbl I'm not sure about the meaning of your last comment, but if it looks like a bug then please open a new issue for it and we can take a look. 🙏 |
A web site I am attempting to scrape sends multiple "set-cookie"s.
These appear to be written to a dictionary, i.e. previous keys ("Set-Cookie") are overwritten:
https://github.com/micropython/micropython-lib/blob/master/python-ecosys/urequests/urequests.py#L153
A custom function can be supplied - here's one that keeps a list:
But this of little use since the
headers
dict parameter of therequest
function has the same limitation (only one can be specified).The text was updated successfully, but these errors were encountered: