commit 242cf484f02385d0899fafe5b5c8e58afc663670 parent 8dd08fa6092125b6f3f1de8f8b71441eb8a28ab8 Author: Solderpunk <solderpunk@sdf.org> Date: Tue, 13 Aug 2019 20:40:14 +0300 Get tough on non-standard status codes! Diffstat:
M | av98.py | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/av98.py b/av98.py @@ -255,7 +255,7 @@ Slow internet connection? Use 'set timeout' to be more patient.""") # Validate header status, meta = header.split(maxsplit=1) - if len(header) > 1024 or len(status) > 2 or not status.isnumeric(): + if len(header) > 1024 or len(status) != 2 or not status.isnumeric(): print("ERROR: Received invalid header from server!") f.close() return