mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #8622: accessing POST after a POST handling exception no longer throws the server into an infinite loop. Thanks to vung for tracking this one down and fixing it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -3,7 +3,7 @@ from django.core.files.uploadedfile import UploadedFile
|
||||
from django.http import HttpResponse, HttpResponseServerError
|
||||
from django.utils import simplejson
|
||||
from models import FileModel
|
||||
from uploadhandler import QuotaUploadHandler
|
||||
from uploadhandler import QuotaUploadHandler, ErroringUploadHandler
|
||||
from django.utils.hashcompat import sha_constructor
|
||||
|
||||
def file_upload_view(request):
|
||||
@@ -84,3 +84,7 @@ def file_upload_getlist_count(request):
|
||||
for key in request.FILES.keys():
|
||||
file_counts[key] = len(request.FILES.getlist(key))
|
||||
return HttpResponse(simplejson.dumps(file_counts))
|
||||
|
||||
def file_upload_errors(request):
|
||||
request.upload_handlers.insert(0, ErroringUploadHandler())
|
||||
return file_upload_echo(request)
|
||||
|
||||
Reference in New Issue
Block a user