mirror of
https://github.com/django/django.git
synced 2025-11-20 03:30:00 +00:00
Fixed #36467 -- Removed leading whitespaces from Set-Cookie header values in WSGIHandler.
This also aligned the Set-Cookie logic in the WSGIHandler and ASGIHandler. Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
This commit is contained in:
parent
1cd91d5d4b
commit
db4d65f8be
4 changed files with 22 additions and 4 deletions
|
|
@ -6,7 +6,14 @@ def helloworld(request):
|
|||
return HttpResponse("Hello World!")
|
||||
|
||||
|
||||
def cookie(request):
|
||||
response = HttpResponse("Hello World!")
|
||||
response.set_cookie("key", "value")
|
||||
return response
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path("", helloworld),
|
||||
path("cookie/", cookie),
|
||||
path("file/", lambda x: FileResponse(open(__file__, "rb"))),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue