SocketServer and Ctrl-C on Windows

Chris Angelico rosuav at gmail.com
Mon Apr 3 12:26:30 EDT 2017


On Tue, Apr 4, 2017 at 12:34 AM, Paul  Moore <p.f.moore at gmail.com> wrote:
> On Monday, 3 April 2017 15:10:12 UTC+1, Chris Angelico  wrote:
>> You're getting HTTP/1.1 requests. Maybe you need to send a
>> "Connection: close" header to tell the browser to leave you be?
>
> That sounds possible - I don't really know enough about HTTP to even know that was a thing, so I'm not surprised if I got it wrong.
>
> My test harness is using a Bottle server, which (apparently) actively gets in the way of setting this header, so I'll have to do a bit more work to confirm this, but it certainly seems like a good lead.

An alternative way to diagnose this would be to see if you still have
an established socket connection. I'm not sure how you do that on
Windows, but it'd be a good thing to check.

ChrisA



More information about the Python-list mailing list