mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix exception in error handler for websocket connections
This commit is contained in:
parent
4be47dd5f2
commit
7da4a00a9b
@ -98,6 +98,7 @@ def parse_uri(uri, parse_query=True):
|
||||
|
||||
# HTTP Header parsing {{{
|
||||
|
||||
|
||||
comma_separated_headers = {
|
||||
'Accept', 'Accept-Charset', 'Accept-Encoding',
|
||||
'Accept-Language', 'Accept-Ranges', 'Allow', 'Cache-Control',
|
||||
@ -288,7 +289,7 @@ class HTTPRequest(Connection):
|
||||
return 'State: %s Client: %s:%s Request: %s' % (
|
||||
getattr(self.handle_event, '__name__', None),
|
||||
self.remote_addr, self.remote_port,
|
||||
force_unicode(self.request_line, 'utf-8'))
|
||||
force_unicode(getattr(self, 'request_line', 'WebSocketConnection'), 'utf-8'))
|
||||
|
||||
def parse_header_line(self, parser, buf, event):
|
||||
line = self.readline(buf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user