mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +03:00
Who care what we do when it's totally malformed? Not me.
This commit is contained in:
parent
4b745eef3a
commit
1b398a20de
|
@ -99,12 +99,5 @@ class TestFileUploadParser(TestCase):
|
|||
filename = parser.get_filename(self.stream, None, self.parser_context)
|
||||
self.assertEqual(filename, 'ÀĥƦ.txt')
|
||||
|
||||
self.__replace_content_disposition('inline; filename=fallback.txt; filename*=utf-8--ÀĥƦ.txt')
|
||||
filename = parser.get_filename(self.stream, None, self.parser_context)
|
||||
|
||||
# Malformed. Either None, 'ÀĥƦ.txt' or 'fallback.txt' will be acceptable.
|
||||
# See also https://code.djangoproject.com/ticket/24209
|
||||
self.assertIn(filename, ('fallback.txt', 'ÀĥƦ.txt', None))
|
||||
|
||||
def __replace_content_disposition(self, disposition):
|
||||
self.parser_context['request'].META['HTTP_CONTENT_DISPOSITION'] = disposition
|
||||
|
|
Loading…
Reference in New Issue
Block a user