Fix typos
This commit is contained in:
parent
9548eab439
commit
1cbd861e61
10
neomi.py
10
neomi.py
|
@ -70,7 +70,7 @@ def drop_privileges():
|
||||||
class Protocol:
|
class Protocol:
|
||||||
gopher, http = range(2)
|
gopher, http = range(2)
|
||||||
|
|
||||||
class RequestEerror(Exception):
|
class RequestError(Exception):
|
||||||
def __init__(self, message):
|
def __init__(self, message):
|
||||||
self.message = message
|
self.message = message
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -104,11 +104,11 @@ def get_request(sock):
|
||||||
try:
|
try:
|
||||||
data = sock.recv(1024)
|
data = sock.recv(1024)
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
raise RequestEerror('Remote end timed out')
|
raise RequestError('Remote end timed out')
|
||||||
if not data: # Other end hung up before sending a header
|
if not data: # Other end hung up before sending a header
|
||||||
raise RequestEerror('Remote end hung up unexpectedly')
|
raise RequestError('Remote end hung up unexpectedly')
|
||||||
if len(data) >= config.request_max_size:
|
if len(request) >= config.request_max_size:
|
||||||
raise RequestEerror('Request too long')
|
raise RequestError('Request too long')
|
||||||
|
|
||||||
request += data
|
request += data
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue