mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Server: Fix bug causing some things to not work when using SSL support on Linux of macOS
sendfile() does nto work with SSL sockets because of SSL framing
This commit is contained in:
parent
313de840ac
commit
c2d6ba54fa
@ -546,7 +546,9 @@ class HTTPConnection(HTTPRequest):
|
||||
self.reset_state()
|
||||
return
|
||||
if isinstance(output, ReadableOutput):
|
||||
self.use_sendfile = output.use_sendfile and self.opts.use_sendfile and sendfile_to_socket_async is not None
|
||||
self.use_sendfile = output.use_sendfile and self.opts.use_sendfile and sendfile_to_socket_async is not None and self.ssl_context is None
|
||||
# sendfile() does nto work with SSL sockets since encryption has to
|
||||
# be done in userspace
|
||||
if output.ranges is not None:
|
||||
if isinstance(output.ranges, Range):
|
||||
r = output.ranges
|
||||
|
Loading…
x
Reference in New Issue
Block a user