Skip to content

Commit 1e03a04

Browse files
committed
Changed the mimetype detection code to only read first 4k block of file, not the whole file.
- Legacy-Id: 5878
1 parent a8c2bc8 commit 1e03a04

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/submit/parsers/plain_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def parse_max_size(self):
3232
def parse_file_charset(self):
3333
import magic
3434
self.fd.file.seek(0)
35-
content = self.fd.file.read()
35+
content = self.fd.file.read(4096)
3636
if hasattr(magic, "open"):
3737
m = magic.open(magic.MAGIC_MIME)
3838
m.load()

0 commit comments

Comments
 (0)