Encode the boundary

merge-requests/2/head
Bob Mottram 2019-11-10 11:45:31 +00:00
parent 3bd0646c6c
commit f1ca34bac8
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ def extractMediaInFormPOST(postBytes,boundary,name: str):
mediaBytes=postBytes[imageStartLocation:]
# look for the next boundary
imageEndBoundary=boundary
imageEndBoundary=boundary.encode('utf8', 'ignore')
imageEndLocation=mediaBytes.find(imageEndBoundary)
if imageEndLocation==-1:
# no ending boundary