-
Notifications
You must be signed in to change notification settings - Fork 213
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
[3.8.0+] Django "active" language is not safe to use with ASGI #475
Comments
@sshishov can you confirm your versions for Django and other dependencies you’re using here please? |
My system: For other dependencies, what exactly do you want as we have a lot? I can try to create the repo with and try to reproduce there. Then share with you guys.
|
@sshishov That's fine. That's the core ones. If you had a minimal test reproduction that would save me a cycle creating one myself (but no stress). Thanks! |
Hi @carltongibson, going to test it in 1-2 days. I guess I can test against |
@sshishov Correct. Thanks! |
I can reproduce this issue with version
3.8.0
and above.Create django project with 1 view which will return you active user language:
Start django under ASGI (using daphne for instance)
Then in 2 terminals/terminal-tabs start the CURL operation for this enpoint with different language in cookies:
And you will observer that every request is affecting the response on another terminal/terminal-tab.
It will be like this:
Meaning it is not consistent when it should be. Especially we are interested in
Content-Language
header which is set automatically and for us the value of this header is affected by other requests...NOTE: Downgrading
asgiref
to version below mentioned (for instance3.7.2
fixes the issue.Possibly related: #473
The text was updated successfully, but these errors were encountered: