1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #23887 -- Returned Bad Request for multipart parsing fails

Thanks Antti Häyrynen and Tim Graham for the report, and Aymeric
Augustin for the review.
This commit is contained in:
Claude Paroz
2014-11-21 21:47:46 +01:00
parent b0a58b9085
commit b38637d581
4 changed files with 31 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ from __future__ import unicode_literals
from django.core.exceptions import SuspiciousOperation
from django.db import connection, transaction
from django.http import HttpResponse, StreamingHttpResponse
from django.views.decorators.csrf import csrf_exempt
def regular(request):
@@ -24,3 +25,9 @@ def not_in_transaction(request):
def suspicious(request):
raise SuspiciousOperation('dubious')
@csrf_exempt
def malformed_post(request):
request.POST
return HttpResponse()