Merge "Fix file uploads > 2 GiB in formpost middleware"

This commit is contained in:
Jenkins 2014-06-12 20:23:20 +00:00 committed by Gerrit Code Review
commit 99cd1ff163
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ def _iter_requests(wsgi_input, boundary):
:returns: A generator of file-like objects for each part.
"""
boundary = '--' + boundary
if wsgi_input.readline().strip() != boundary:
if wsgi_input.readline(len(boundary + '\r\n')).strip() != boundary:
raise FormInvalid('invalid starting boundary')
boundary = '\r\n' + boundary
input_buffer = ''