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


Groups > comp.lang.python > #107242

Re: HTTPServer and SSL

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: HTTPServer and SSL
Date Mon, 18 Apr 2016 01:39:19 -0400
Lines 33
Message-ID <mailman.139.1460958008.6324.python-list@python.org> (permalink)
References <CAPtibM5OMNAvxVN1WPdnGEG3HsXODKq0ZkKKEYxvooetCAhKBg@mail.gmail.com> <nf1rvb$n40$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de 09/zaSmu4Bic/WzHv2Ty+gwlLMVAs6eEvBz13zoNkeJg==
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'handler': 0.04; 'anymore.': 0.09; 'https': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'jan': 0.11; '2.7': 0.13; '2014': 0.16; 'handler)': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'subject:SSL': 0.16; 'wrote:': 0.16; 'attribute': 0.18; 'explicit': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'not.': 0.27; 'wonder': 0.27; 'http': 0.33; 'safely': 0.33; 'similar': 0.33; 'server': 0.34; 'list': 0.34; 'so,': 0.35; "isn't": 0.35; 'supports': 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'received:org': 0.37; 'test': 0.39; 'to:addr:python.org': 0.40; 'hello,': 0.40; 'some': 0.40; 'questions': 0.40; 'received:96': 0.63; 'combining': 0.66; 'approach.': 0.91; 'received:fios.verizon.net': 0.91
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host pool-96-227-207-81.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0
In-Reply-To <CAPtibM5OMNAvxVN1WPdnGEG3HsXODKq0ZkKKEYxvooetCAhKBg@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <nf1rvb$n40$1@ger.gmane.org>
X-Mailman-Original-References <CAPtibM5OMNAvxVN1WPdnGEG3HsXODKq0ZkKKEYxvooetCAhKBg@mail.gmail.com>
Xref csiph.com comp.lang.python:107242

Show key headers only | 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