Skip to content
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

force cookies to be bytes #263

Merged
merged 5 commits into from May 17, 2018

Conversation

Projects
None yet
3 participants
@pbauer
Copy link
Contributor

pbauer commented Apr 2, 2018

to prevent wrapping bytes as text in py3, which ends up as "b'somevalue'"

I'm not sure about this because I heard that most browsers can deal with text/unicode cookies now.

@pbauer

This comment has been minimized.

Copy link
Contributor Author

pbauer commented Apr 2, 2018

O, damn. This leads to cookies like b'__ac': "xxxx". I guess at least the key should be text.

@icemac icemac added this to the 4.0b4 milestone Apr 12, 2018

@icemac icemac modified the milestones: 4.0b4, 4.0b5 Apr 23, 2018

sallner added some commits May 16, 2018

Accept bytes and text as cookie values.
A cookie value is finally quoted before sending, which needs to be `str` in Python 2 and can be bytes or text in Python 3. In Python 3, a conversion would result in a string representation of bytes.
@icemac

icemac approved these changes May 17, 2018

Copy link
Member

icemac left a comment

LGTM.

@sallner sallner merged commit 76314d0 into master May 17, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 79.113%
Details

@sallner sallner deleted the fix_cookie_setting branch May 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.