Test client implicitly assuming data to be querystring
|Reported by:||Owned by:||Johan Sommerfeld|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In some of the request methods (get, head, options, delete) the data input is assumed to be used as querystring input. This makes the client break when sending data such as a json string since urlencode assumes data to be a dict
This has been solved for some methods. In #11371 for the put request, where the solution was that urlencode was removed and querystring was only extracted from the path with urlparse.
The methods have a lot of redundant code, wehre as it is mostly the setting of content-length and such, this could be consolidated to one function wheras we could keep the possibility to send querystring as a dict into data with the content_type set to some dummy type such as "querystring". This aproach would be benefitial since we then allow the test client to send a body with all request, which is as far as I know not forbidden according to the rfc:2616 (I'm no expert in reading rfcs if I'm wrong pleas correct me).
Change History (6)
comment:1 Changed 5 years ago by
|Patch needs improvement:||unset|
|Type:||Uncategorized → Bug|
comment:3 Changed 5 years ago by
|Owner:||changed from nobody to Johan Sommerfeld|
|Status:||new → assigned|