diff --git a/content.py b/content.py index d269dbfd0..ba3f96e67 100644 --- a/content.py +++ b/content.py @@ -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