fix ssl issue in web_server.py
This commit is contained in:
parent
5fcd1237f0
commit
c147caca0d
|
@ -3959,7 +3959,7 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(m_recv_pos >= size + offset);
|
||||
TORRENT_ASSERT(offset >= 0);
|
||||
|
||||
if (size > 0)
|
||||
if (size > 0)
|
||||
std::memmove(&m_recv_buffer[0] + offset, &m_recv_buffer[0] + offset + size, m_recv_pos - size - offset);
|
||||
|
||||
m_recv_pos -= size;
|
||||
|
|
|
@ -133,12 +133,12 @@ class http_handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
if __name__ == '__main__':
|
||||
port = int(sys.argv[1])
|
||||
chunked_encoding = sys.argv[2] != '0'
|
||||
ssl = sys.argv[3] != '0'
|
||||
use_ssl = sys.argv[3] != '0'
|
||||
|
||||
# TODO: SSL support
|
||||
http_handler.protocol_version = 'HTTP/1.1'
|
||||
httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', port), http_handler)
|
||||
if ssl:
|
||||
if use_ssl:
|
||||
httpd.socket = ssl.wrap_socket(httpd.socket, certfile='../ssl/server.pem', server_side=True)
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue