summaryrefslogtreecommitdiff
path: root/docs/internals/contributing/writing-code
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2026-05-01 12:20:28 -0400
committerJacob Walls <jacobtylerwalls@gmail.com>2026-05-06 10:42:15 -0400
commit1085e5e17b7403b15c4eff397f3c98c15660f46d (patch)
tree1617a2efc9162ecf16e70d488686316ddd2252ae /docs/internals/contributing/writing-code
parent75bb46cc454fdef0585f0a460f36f579b59f0356 (diff)
Fixed #36300 -- Restored the semantic where RemoteUserMiddleware.header corresponds to request.META under ASGI.
Because these tests always passed both WSGI environ values and HTTP headers via `**extra`, this masked a behavior difference between WSGI and ASGI. What should happen: everything should be passed via `headers` but for the default REMOTE_USER case on WSGI, which should be passed via `**extra`. Since that was not done, a regression made it into Django 5.2 (50f89ae850f6b4e35819fe725a08c7e579bfd099) where `.header` no longer corresponded to the request.META key under ASGI. To cope, an ASGI user would have started(*) sending HTTP headers that match the `.header` attribute, which may or may not have been edited to remove the HTTP_ prefix. (Note: the default `REMOTE_USER` case did not work under ASGI, so the change in Django 5.2 had the effect of fixing the default case but changing the semantic of the custom case.) (*): Unless they were getting the sync execution path, which didn't have this bug. See the fix in 0f4fff79d33b7cc84822e66bd1fc16caf8222e3a. Thanks Mykhailo Havelia and Sarah Boyce for reviews.
Diffstat (limited to 'docs/internals/contributing/writing-code')
0 files changed, 0 insertions, 0 deletions