You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to be able to consistently override cookies in requests using Route.continue_. I'm setting foo=bar as cookie when creating a context, and I'd like to avoid sending it afterwards. What I've tried:
override_headers = {"cookie": None}. I'd expect the cookie header not to be sent, however it is sent by chromium & webkit, not by firefox.
override_headers = {"cookie": "asdf=qwerty"}. I'd expect the cookie header to be "asdf=qwerty", and it is for webkit & firefox, however chromium still sends "foo=bar"
override_headers = {}. Chromium & webkit send "foo=bar", firefox sends no cookie. I have no strong argument for either behavior, the problem for me is the inconsistency.
User agent
Additionally, the user agent header is handled differently by three browsers:
Firefox never sends it (I suspect it's because it's never present in the headers dict)
Webkit always sends a different value from the one in the request headers
Chromium sends the value from the request headers
Sorry for the long snippet ): Please let me know if there's something I'm missing or doing wrong, and thanks in advance for your time.
PS: I'm adding the full outputs below for completeness.
Context:
Code Snippet
Describe the bug
Cookies
I can't seem to be able to consistently override cookies in requests using
Route.continue_
. I'm settingfoo=bar
as cookie when creating a context, and I'd like to avoid sending it afterwards. What I've tried:override_headers = {"cookie": None}
. I'd expect the cookie header not to be sent, however it is sent by chromium & webkit, not by firefox.override_headers = {"cookie": "asdf=qwerty"}
. I'd expect the cookie header to be "asdf=qwerty", and it is for webkit & firefox, however chromium still sends "foo=bar"override_headers = {}
. Chromium & webkit send "foo=bar", firefox sends no cookie. I have no strong argument for either behavior, the problem for me is the inconsistency.User agent
Additionally, the user agent header is handled differently by three browsers:
Sorry for the long snippet ): Please let me know if there's something I'm missing or doing wrong, and thanks in advance for your time.
PS: I'm adding the full outputs below for completeness.
`override_headers = {"cookie": None}`
`override_headers = {"cookie": "asdf=qwerty"}`
`override_headers = {}`
The text was updated successfully, but these errors were encountered: