﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31494	Allow test Client to re-use query string for non-GET requests when following 307/308 redirects.	Max Crowe	Ahmad Abdallah	"If an application uses an HTTP 307 or 308 response to redirect /foo/ to /bar/?a=b, when the test client is instructed to follow redirects, the ultimate request will be to /bar/ (with no query string). This is due to the fact that the test client only examines the query portion of the response URL if the HTTP status is not 307 or 308:

{{{#!python
if response.status_code in (HTTPStatus.TEMPORARY_REDIRECT, HTTPStatus.PERMANENT_REDIRECT):
    # Preserve request method post-redirect for 307/308 responses.
    request_method = getattr(self, response.request['REQUEST_METHOD'].lower())
else:
    request_method = self.get
    data = QueryDict(url.query)
    content_type = None
}}}

The test client should respect query strings indicated in redirect URLs, even if the request method is something other than GET or HEAD."	New feature	closed	Testing framework	dev	Normal	fixed	test client redirect	Ahmad Abdallah	Accepted	1	0	0	0	0	0
