diff --git a/multipart/multipart.py b/multipart/multipart.py index 47e00a7..a8fccee 100644 --- a/multipart/multipart.py +++ b/multipart/multipart.py @@ -1846,7 +1846,7 @@ def parse_form( while True: # Read only up to the Content-Length given. - max_readable = min(content_length - bytes_read, chunk_size) + max_readable = int(min(content_length - bytes_read, chunk_size)) buff = input_stream.read(max_readable) # Write to the parser and update our length.