Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107242

Re: HTTPServer and SSL

From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: HTTPServer and SSL
Date 2016-04-18 01:39 -0400
Message-ID <mailman.139.1460958008.6324.python-list@python.org> (permalink)
References <CAPtibM5OMNAvxVN1WPdnGEG3HsXODKq0ZkKKEYxvooetCAhKBg@mail.gmail.com> <nf1rvb$n40$1@ger.gmane.org>

Show all headers | View raw


On 4/17/2016 10:56 AM, Radek HolĂ˝ wrote:
> Hello,
>
> some people recommend following implementation of a simple HTTP server
> that supports SSL:
>
> asdfghjkki
> Handler = http.server.BaseHTTPRequestHandlerhttpd =
> http.server.HTTPServer(("", 4443), Handler)
> httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True)
> httpd.serve_forever()
>
> I wonder whether this usage is *supported* or not. The documentation
> is not explicit about whether the httpd.socket attribute can be safely
> reassigned. Also there were some questions regarding a simple HTTPS
> server on this list already and none of the answerers mentioned this
> approach.
>
> Also there used to be a HTTPSServer in the test suite of Python 2.7 in
> 2014 that did a similar thing but in the "get_request" method but it
> isn't there anymore.
>
> So, is there a *supported* way of combining http.server.HTTPServer and ssl?
>
> Best regards
>


-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: HTTPServer and SSL Terry Reedy <tjreedy@udel.edu> - 2016-04-18 01:39 -0400

csiph-web