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

About _extractResponseCookies #16

Closed
jet10000 opened this issue Jan 8, 2020 · 3 comments
Closed

About _extractResponseCookies #16

jet10000 opened this issue Jan 8, 2020 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jet10000
Copy link

jet10000 commented Jan 8, 2020

Today, I test requests for request django LoginView, the login success response 302 and the responseHeaders like:

{set-cookie: csrftoken=JXbDPUlqe3pJCxC3EHib4HT52WIFtpKeS63qsYMyehcVocrWUMIZeleUmBx1IZBj; expires=Wed, 06 Jan 2021 21:21:58 GMT; Max-Age=31449600; Path=/; SameSite=Lax,sessionid=58zhlb01kfqoa528efxpr4o75b02x76j; expires=Wed, 22 Jan 2020 21:21:58 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax, location: /, cache-control: max-age=0, no-cache, no-store, must-revalidate, private, date: Wed, 08 Jan 2020 21:21:58 GMT, vary: Cookie, content-length: 0, x-frame-options: DENY, content-type: text/html; charset=utf-8, x-content-type-options: nosniff, server: WSGIServer/0.2 CPython/3.7.6, expires: Wed, 08 Jan 2020 21:21:58 GMT}

I found SameSite=Lax,sessionid=58zhlb01kfqoa528efxpr4o75b02x76j;, and parser result not contains sessionid,only csrftoken=JXbDPUlqe3pJCxC3EHib4HT52WIFtpKeS63qsYMyehcVocrWUMIZeleUmBx1IZBj

Is this a django bug? or a requrests _extractResponseCookies bug?

@jet10000
Copy link
Author

jet10000 commented Jan 8, 2020

I use python requests, the response headers like:
('set-cookie', 'csrftoken=o082sC9furgSvorcIR2kLiEPA1eR7TqSQKPrWznTCLE8jIvYZuGrfjz6ryp8lALU; expires=Wed, 06 Jan 2021 23:39:59 GMT; Max-Age=31449600; Path=/; SameSite=Lax'), ('set-cookie', 'sessionid=su81gefosri54cy5a11f4tnsxp49a6n5; expires=Wed, 22 Jan 2020 23:39:59 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax')]

Maybe dart http library problem?

@jossef
Copy link
Owner

jossef commented Jan 9, 2020

seems like a bug in _extractResponseCookies
it should not break on first match

can you submit a PR with a fix?

@jossef jossef added bug Something isn't working good first issue Good for newcomers labels Jan 9, 2020
@jet10000
Copy link
Author

@jossef jossef closed this as completed in 7b2d34b May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants