Files
CN2021/server/serversocket.py

14 lines
297 B
Python

import socket
from httplib.exceptions import BadRequest
from httplib.httpsocket import HTTPSocket
class ServerSocket(HTTPSocket):
def read_line(self):
try:
return super().read_line()
except UnicodeDecodeError:
raise BadRequest("UnicodeDecodeError")