Python socket server handle HTTPS request

后端 未结 2 962
醉酒成梦
醉酒成梦 2021-01-14 10:12

I wrote a socket server using Python 2.7 and the socket module.

Everything works as expected when I issue an HTTP request: the server accepts it and ans

2条回答
  •  终归单人心
    2021-01-14 11:00

    Try this. The module names have changed so that they are now part of the http.server module (part of a standard installation) - see the note at the top of the SimpleHTTPServer documentation for Python 2. The main problem, though, is that you need to get an SSL certificate to secure connections with (the easiest way I believe is OpenSSL).

提交回复
热议问题