Changes between Initial Version and Version 1 of Ticket #613
- Timestamp:
- Oct 11, 2005, 2:52:14 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #613 – Description
initial v1 1 1 There should be a way to prevent parsing of POST data for some view functions. This would be usefull for example for view functions that do their own POST parsing, like some view function that parses XMLRPC requests or some other special format. Currently access to POST (either the dict as a whole or some variable in it) will instantiate the QueryDict for the post data and so parse the post raw data - even if it isn't a valid POST query string. That would put high load on the machine if the POST data is rather large - think of a XMLRPC API where ImageField content is transported as base64 data ... 2 3 Django currently parses the POST data lazily, but middlware might try to access POST on a request and trigger parsing, even though the function itself never touches POST. So this would be more kind of a safety net. 4 5 A idea on how to do it: a decorator that registers a view function into some global dictionary and then a check in BaseHandler.get_response wether the discovered view function is in that global dictionary and if yes, switch the request to a don't-parse-POST state (that needs to be checked in the _get_post property getters in both the WSGRequest and the ModPythonRequest).