From eb9bee110aea6daea95dc50a0a538a6887e32d17 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Feb 2021 15:08:09 +0000 Subject: [PATCH] Decode bytes --- daemon.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index c7dd41e95..d56741af7 100644 --- a/daemon.py +++ b/daemon.py @@ -4045,11 +4045,12 @@ class PubServer(BaseHTTPRequestHandler): ' image or font could not be saved to ' + postImageFilename) - if '&previewAvatar=' in postBytes: + postBytesStr = postBytes.decode('utf-8') + if '&previewAvatar=' in postBytesStr: print('previewAvatar in postBytes') - if '&prevWelcomeScreen=' in postBytes: + if '&prevWelcomeScreen=' in postBytesStr: print('prevWelcomeScreen in postBytes') - if '&nextWelcomeScreen=' in postBytes: + if '&nextWelcomeScreen=' in postBytesStr: print('nextWelcomeScreen in postBytes') # extract all of the text fields into a dict