#17474: Problem when the request doesn't have Content-Type.
-------------------------------------+-------------------------------------
     Reporter:  Marcelo Salhab       |                    Owner:  nobody
  Brogliato <msbrogli@…>             |                   Status:  reopened
         Type:  Bug                  |                  Version:  1.3
    Component:  HTTP handling        |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  content-type         |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by olau):

 * cc: olau@… (added)
 * status:  closed => reopened
 * resolution:  needsinfo =>


Comment:

 Hi!

 We had the same problem with a Django instance running inside mod_python
 (yes, I know mod_python is bad, it's a client's server). I think it
 happens with a custom iPhone client. Here's the traceback:

 {{{
 Traceback:
 File "/var/sites/bcl/PYTHON_ENV/lib/python2.5/site-
 packages/django/core/handlers/base.py" in get_response
   111.                         response = callback(request,
 *callback_args, **callback_kwargs)
 File "/var/sites/bcl/main/api.py" in inner
   17.         token = request.GET.get("authtoken",
 request.POST.get("authtoken"))
 File "/var/sites/bcl/PYTHON_ENV/lib/python2.5/site-
 packages/django/core/handlers/modpython.py" in _get_post
   101.             self._load_post_and_files()
 File "/var/sites/bcl/PYTHON_ENV/lib/python2.5/site-
 packages/django/http/__init__.py" in _load_post_and_files
   270.         if self.META.get('CONTENT_TYPE',
 '').startswith('multipart'):

 Exception Type: AttributeError at /api/events/log/
 Exception Value: 'NoneType' object has no attribute 'startswith'
 }}}

 If you want to test it, you could try telnetting a POST response,
 something like "telnet localhost 8000", then copy-paste
 {{{
 POST / HTTP/1.0
 Content-length: 17

 query=1234
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17474#comment:3>
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.

Reply via email to