Get tough on non-standard status codes!
This commit is contained in:
parent
8dd08fa609
commit
242cf484f0
2
av98.py
2
av98.py
|
@ -255,7 +255,7 @@ Slow internet connection? Use 'set timeout' to be more patient.""")
|
||||||
|
|
||||||
# Validate header
|
# Validate header
|
||||||
status, meta = header.split(maxsplit=1)
|
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!")
|
print("ERROR: Received invalid header from server!")
|
||||||
f.close()
|
f.close()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue