#18048: Test client implicitly assuming data to be querystring -----------------------------------+------------------------- Reporter: johan@… | Owner: nobody Type: Uncategorized | Status: new Component: Testing framework | Version: 1.4 Severity: Normal | Keywords: test client Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+------------------------- 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). -- Ticket URL: <https://code.djangoproject.com/ticket/18048> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.