Skip to content

Commit b4fe28a

Browse files
authored
Merge pull request #730 from TofBaasken/master
Fix bug emlparser when 'content-type' string in mail is in lower case
2 parents c7bc691 + 11fca40 commit b4fe28a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

analyzers/EmlParser/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def parseEml(filepath):
8989
#splited string because it was returning the body inside 'Content-Type'
9090
hParser = email.parser.HeaderParser()
9191
h = str(hParser.parsestr(raw_eml))
92-
result['headers'] = h[:h.index('Content-Type:')]
92+
result['headers'] = h[:h.lower().index('content-type:')]
9393

9494
parsed_eml = eml_parser.eml_parser.decode_email(filepath, include_raw_body=True, include_attachment_data=True)
9595
#parsed_eml['header'].keys() gives:

0 commit comments

Comments
 (0)