Hello, I received a traceback from Django and I'm unable to figure out where the error comes from. The form is a basic picture upload form, I've read that this kind of errors do happen when the connection is broken before all data was sent, but here, the crash occured in csrf.py, which it was not in other error reports that I read.
So here's my traceback and my Middleware config, if someone has seen this, please tell me (and hopefully explain : D), because I'm kinda running out of ideas (and so far, I've been unable to recreate the error). Thanks in advance ! Middleware: MIDDLEWARE_CLASSES = ( 'middleware.loc.ForceDefaultLanguageMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django_mobile.middleware.MobileDetectionMiddleware', 'django_mobile.middleware.SetFlavourMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'middleware.technical.UserBasedExceptionMiddleware', ) Traceback: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 105, in get_response response = middleware_method(request, callback, callback_args, callback_kwargs) File "/usr/local/lib/python2.6/dist-packages/django/middleware/csrf.py", line 200, in process_view request_csrf_token = request.POST.get('csrfmiddlewaretoken', '') File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 210, in _get_post self._load_post_and_files() File "/usr/local/lib/python2.6/dist-packages/django/http/__init__.py", line 272, in _load_post_and_files self._post, self._files = self.parse_file_upload(self.META, self) File "/usr/local/lib/python2.6/dist-packages/django/http/__init__.py", line 234, in parse_file_upload return parser.parse() File "/usr/local/lib/python2.6/dist-packages/django/http/multipartparser.py", line 192, in parse for chunk in field_stream: File "/usr/local/lib/python2.6/dist-packages/django/http/multipartparser.py", line 314, in next output = self._producer.next() File "/usr/local/lib/python2.6/dist-packages/django/http/multipartparser.py", line 468, in next for bytes in stream: File "/usr/local/lib/python2.6/dist-packages/django/http/multipartparser.py", line 314, in next output = self._producer.next() File "/usr/local/lib/python2.6/dist-packages/django/http/multipartparser.py", line 375, in next data = self.flo.read(self.chunk_size) File "/usr/local/lib/python2.6/dist-packages/django/http/multipartparser.py", line 405, in read return self._file.read(num_bytes) File "/usr/local/lib/python2.6/dist-packages/django/http/__init__.py", line 296, in read return self._stream.read(*args, **kwargs) IOError: request data read error <WSGIRequest GET:<QueryDict: {}>, *POST:<could not parse>,* COOKIES:{'__utma': '104694172.1806779657.1312296229.1312296229.1312296229.1', '__utmb': '104694172.2.10.1312296229', '__utmc': '104694172', '__utmz': '104694172.1312296229.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)', 'sessionid': 'MySession'}, META:{'CONTENT_LENGTH': '1789914', 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryU0XxylAHGDwkWtTB', 'CSRF_COOKIE': 'MyCookie', 'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': '1', 'HTTP_ACCEPT': 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=MySession; csrftoken=MyCSRF; __utmz=104694172.1312296229.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmc=104694172; __utmb=104694172.2.10.1312296229; __utma=104694172.1806779657.1312296229.1312296229.1312296229.1', 'HTTP_HOST': 'www.MySite.com', 'HTTP_ORIGIN': 'www.MySite.com', 'HTTP_REFERER': 'www.MySite.com/MyForm', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; fr-fr) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1', 'PATH_INFO': u'/user/photo', 'PATH_TRANSLATED': '/var/www/user/photo', 'QUERY_STRING': '', 'REMOTE_ADDR': '2.1.94.60', 'REMOTE_PORT': '55900', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/MyApp/user/photo', 'SCRIPT_FILENAME': '/usr/local/MyApp/apache/django.wsgi', 'SCRIPT_NAME': u'/MyApp', 'SERVER_ADDR': 'MyIP', 'SERVER_ADMIN': 'hostmas...@mysite.com', 'SERVER_NAME': 'www.MySite.com', 'SERVER_PORT': '443', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.14 (Ubuntu) Server at www.MySite.com Port 443</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.14 (Ubuntu)', 'SSL_TLS_SNI': 'www.MySite.com', 'mod_wsgi.application_group': 'www.MySite.com|/MyApp', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '443', 'mod_wsgi.process_group': '', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 3), 'wsgi.errors': <mod_wsgi.Log object at 0x7f767c50b6f0>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f767c4a2dc8>, 'wsgi.input': <mod_wsgi.Input object at 0x7f767c1e6430>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'https', 'wsgi.version': (1, 1)}> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.