On Tue, Apr 4, 2017 at 12:34 AM, Paul Moore 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 enoug
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 surp
On Mon, Apr 3, 2017 at 11:56 PM, Paul Moore wrote:
> On Monday, 3 April 2017 14:20:43 UTC+1, Paul Moore wrote:
>> On Monday, 3 April 2017 14:00:18 UTC+1, eryk sun wrote:
>> > It should service the request and return to the serve_forever() loop.
>> > Do you see a line logged for each request, l
On Monday, 3 April 2017 14:20:43 UTC+1, Paul Moore wrote:
> On Monday, 3 April 2017 14:00:18 UTC+1, eryk sun wrote:
> > It should service the request and return to the serve_forever() loop.
> > Do you see a line logged for each request, like "[IP] - - [date] "GET
> > ..."?
>
> Yes, I see that a
On Mon, Apr 3, 2017 at 1:20 PM, Paul Moore wrote:
> On Monday, 3 April 2017 14:00:18 UTC+1, eryk sun wrote:
>> It should service the request and return to the serve_forever() loop.
>> Do you see a line logged for each request, like "[IP] - - [date] "GET
>> ..."?
>
> Yes, I see that and the page
On Monday, 3 April 2017 14:00:18 UTC+1, eryk sun wrote:
> It should service the request and return to the serve_forever() loop.
> Do you see a line logged for each request, like "[IP] - - [date] "GET
> ..."?
Yes, I see that and the page is served.
>py .\example.py
Serving HTTP on port 8000...
12
On Mon, Apr 3, 2017 at 12:34 PM, Paul Moore wrote:
> On Monday, 3 April 2017 13:23:11 UTC+1, eryk sun wrote:
>> It works for me when run from a command prompt in Windows 10.
>> serve_forever() uses select() with a timeout of 0.5s, so it doesn't
>> block the main thread.
>
> Odd. For me, it doesn
On Monday, 3 April 2017 13:23:11 UTC+1, eryk sun wrote:
> It works for me when run from a command prompt in Windows 10.
> serve_forever() uses select() with a timeout of 0.5s, so it doesn't
> block the main thread.
Odd. For me, it doesn't work (Windows 7, but I can't see why that would affect
it
On Mon, Apr 3, 2017 at 9:08 AM, Paul Moore wrote:
> I know I've seen this before, but for the life of me I can't find any
> reference.
>
> If I write a simple web server using wsgiref, something like
>
> from wsgiref.simple_server import make_server, demo_app
>
> with make_server('', 800