1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #32929 -- Fixed handling query strings in AsyncRequestFactory.

This commit is contained in:
pochangl
2021-07-15 19:09:29 +08:00
committed by GitHub
parent f479df7f8d
commit f6d3557aa1
2 changed files with 11 additions and 0 deletions

View File

@@ -547,6 +547,8 @@ class AsyncRequestFactory(RequestFactory):
follow = extra.pop('follow', None)
if follow is not None:
s['follow'] = follow
if query_string := extra.pop('QUERY_STRING', None):
s['query_string'] = query_string
s['headers'] += [
(key.lower().encode('ascii'), value.encode('latin1'))
for key, value in extra.items()