From f1ca34bac8e3a2de23ae33d511439f6b83ac20af Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 10 Nov 2019 11:45:31 +0000 Subject: [PATCH] Encode the boundary --- content.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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