﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10850	Impossible to stop a large file upload mid-stream	legutierr	nobody	"As described in [http://groups.google.com/group/django-users/browse_thread/thread/d4e4394c1b3d68dc/f8bc012acf797219?lnk=gst&q=StopUpload#f8bc012acf797219 this post] on the django-users group, raising {{{django.core.files.uploadhandler.StopUpload(connection_reset=True)}}} in order to cut off a too-large file upload does not work [http://docs.djangoproject.com/en/dev/topics/http/file-uploads/#required-methods as documented].  Nor does it work as specified in [http://code.djangoproject.com/browser/django/trunk/django/core/files/uploadhandler.py#L30 comments to the code], nor according to [http://code.djangoproject.com/ticket/2070#comment:275 a discussion] regarding the implementation of this feature.

The connection reset functionality does work correctly using the development server, but not using mod_python or fastcgi on lighttpd or Apache.  It seems that in both cases the webserver pre-loads the entire file, regardless of its size, without Django taking the opportunity to interrupt the stream, even if {{{StopUpload(connection_reset=True)}}} is raised by {{{receive_data_chunk()}}} inside a subclass of {{{FileUploadHandler}}}.

The most egregious side effect of this defect is that while the file is uploading to the server, the server experiences significant slow-downs.  

In addition, without a fix, any restrictions on file-size for upload will not be delivered to users until they have waited for many minutes uploading their unacceptable file, a user-interaction failure that should be avoidable.
"	Bug	new	File uploads/storage	dev	Normal		upload, StopUpload		Accepted	0	0	0	0	0	0
