mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #31494 -- Added test for query strings for GET/HEAD requests when following HTTP 307/308 redirects in test client.
This commit is contained in:
parent
9d55ae00d3
commit
6425fd3124
3 changed files with 30 additions and 0 deletions
|
@ -131,6 +131,14 @@ def redirect_view(request):
|
|||
return HttpResponseRedirect('/get_view/' + query)
|
||||
|
||||
|
||||
def method_saving_307_redirect_query_string_view(request):
|
||||
return HttpResponseRedirect('/post_view/?hello=world', status=307)
|
||||
|
||||
|
||||
def method_saving_308_redirect_query_string_view(request):
|
||||
return HttpResponseRedirect('/post_view/?hello=world', status=308)
|
||||
|
||||
|
||||
def _post_view_redirect(request, status_code):
|
||||
"""Redirect to /post_view/ using the status code."""
|
||||
redirect_to = request.GET.get('to', '/post_view/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue