#8930 closed (invalid)
Posting non-multipart Data Throws Exception
Reported by: | mentat | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Using 8921, when I try to post a binary block, encoded by base64 (for a specialized api), the QueryDict parser seems to throw an exception and I see the following error in my error log:
Sep 7 13:40:22 httpd[5964]: [error] [client ?.?.?.?] File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 90, in _load_post_and_files\n self._post, self._files = http.QueryDict(self.raw_post_data, encoding=self._encoding), datastructures.MultiValueDict()
My HTTP message looks something like:
POST /myapi/ HTTP/1.1 Host: mysite.com Content-type: application/octet-stream Date: Sun, 07 Sep 2008 19:07:47 GMT Authorization: CUSTOM bill@6d44b591b489b6be869d0dae2b8c04df2c4c994f H3sIAIMmxEgC/41UXWvbMBR769Q3Ye6zLOWrt1HUWxC40Eg2bLUexghDM9WMy3+QpbDAvvxkyXb koJrFghI99x77pHukZH/J0vBEdOKFPnUmrhvLN+7QJfzL4/h93UA4qI4/OR/sOXBYBmsgs+hCtoV jhkvrHyH4piU+NVNUzwLw+XiScuL64oVGaYkAY/zWTgDV4vVerkI5p7G2nH1rK8THKeS8SxHIMC+ Wgs2o6eRofptgq/fFhuzoZQMbEZYip0TwWniO22975B8T3FCcM4qh2TRHvtOXjDMj5rgKqaklGkJ oa1uQ0bLPS5ANDaP0UFCDbCjrKhz5oA8yrCS2C4tkkeRtrDjd4cl/48Jlq7F2CrjTknFR8WIi50 WIaEapqOidBGMNxAjeWFO2GOSxA5+aP46Eqo5hrTfBzVKfsb0lxhekR34DrbnltlKvO/1294wQD j4W/x9u3d/eWdwH4D3UPRG71UOf2qXXLs59YRBl/0Qjq8FhV02NO8vyFoj7Wtka9u6fWxw/v393f WRq7cLW3OoFP0bGghGGwEekISkRlCpOrvYhJY3sTBNuVCTfe9ppr4w7jWsVWEcIzRqR5WpwSaphm 5LMmCvHQ5VY3ZDvhcylBRtLDbuchqKVo7QcpUe/oqfWLsfIBQhGp3AM+qQo3LjKY8XWd/ZCX6v4u 94ZizZlK2Kz5ep9ARbKSf0zkZFyhUU/XSHp/Ko45JfmhLVJwO3tJyR0KO4t6/wC5183aNgYAAA==
My setup is:
- Centos5 (xen kernel)
- apache 2.2
- mod_python 3.3
- django svn 8921
- python 2.4.3
The app, internally, uses the raw_post_data to access the submitted data. I'm guessing that wrapping parse_qsl in http/init.py line 147 might do the trick, but I haven't been able to deploy this out (the error doesn't occur with the django testing server).
Note:
See TracTickets
for help on using tickets.
I've found the error the parse_qsl throws:
So I am able to do a work around with that info.