#30015 closed Bug (fixed)
HTTP server doesn't clear previous request data in keep-alive connection.
Reported by: | Konstantin Alekseev | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | 2.1 |
Severity: | Release blocker | Keywords: | keep-alive, server |
Cc: | Florian Apolloner | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django 2.1.4 affected.
Commit that enabled keep-alive connections https://github.com/django/django/commit/934acf1126995f6e6ccba5947ec8f7561633c27f
Bug: if you make two requests in one keep-alive connection and first request posted data that wasn't read in the view
then on second request that data will be read alongside with first line of the new request.
As a result request.method will contain "..data from previous request...POST"
Pull request with test and possible fix https://github.com/django/django/pull/10732
Change History (7)
comment:1 by , 6 years ago
Cc: | added |
---|---|
Component: | Core (Other) → HTTP handling |
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
Nevermind my previous comment, my issue was in fact different (and might actually be invalid), cf #30018
comment:4 by , 6 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Hello,
our Selenium tests were also affected by the same change (bisecting lead to https://github.com/django/django/commit/e1721ece485b35ab5543f134203a8a8ce9f31a7c which is https://github.com/django/django/commit/934acf1126995f6e6ccba5947ec8f7561633c27f).
Basically, the webdriver
get(url)
gets stuck for several hundred of seconds leading to test timeout, I'm trying to build a minimal selenium test showing this regression.In the meanwhile, the provided patch makes our tests pass again but seems to crash a bunch of threads with:
or