Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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: UI/UX:


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/", 
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
Content-type: application/octet-stream
Date: Sun, 07 Sep 2008 19:07:47 GMT
Authorization: CUSTOM bill@6d44b591b489b6be869d0dae2b8c04df2c4c994f


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/ 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).

Change History (2)

comment:1 Changed 7 years ago by mentat

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

I've found the error the parse_qsl throws:

argument 1 must be string without null bytes, not str

So I am able to do a work around with that info.

comment:2 Changed 7 years ago by mentat

Sorry, this should actually be marked as dup of #5611

Note: See TracTickets for help on using tickets.
Back to Top