﻿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
11786	TestClient() forgets any PUT querystrings if there is payload data	steve@…	nobody	"Hi

On line 370 of contrib.test.client.py there is the following line in the put() method:

 'QUERY_STRING':   urlencode(data, doseq=True) or parsed[4],

(by comparison, post() has:

  'QUERY_STRING':   parsed[4],


As a a result of the way the code is in put(), if there is a querystring (eg user_token=foo123) and also payload data with the PUT { foo:'12' } , the querystring is overwritten with the payload data.

Now, I'm not 100% whether PUT can take querystrings and payload data at the same time, but if it is supposed to, how about instead we have line 370 as:

  'QUERY_STRING':   parsed[4] or urlencode(data, doseq=True),

Which seems to work fine (ie, my app's tests now pass)

"		closed	Testing framework	1.1		duplicate	PUT		Unreviewed	0	0	0	0	0	0
