New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent connections in BaseHTTPServer #34587
Comments
This patch provides HTTP/1.1 persistent |
Logged In: YES I haven't studied the patch in detail, yet, but I have a
|
Logged In: YES I have updated the patch against current CVS and have added |
Logged In: YES The patch in its current form seems to be broken. To see the The server will use the protocol version HTTP/1.0, but the It might be useful to enhance the SimpleHTTPServer test() |
Logged In: YES I reworked the patch a bit to ensure HTTP 1.1 mode is only |
Logged In: YES It still doesn't work right. If I access SimpleHTTPServer localhost - - [18/Sep/2001 18:32:22] code 400, message Bad These are caused because the client closes the connection |
Logged In: YES I've tracked that one down and will have an updated patch in |
Logged In: YES Any chance that an updated patch is forthcoming? |
Logged In: YES Here's my current version of the patch; the main change is that errors now result in closing the connection. A cleaner approach for HTTP 1.1 would be to use Chunked Transfer Encoding for this, so the connection could remain available. I still get spurious IOErrors (due to SIGPIPEs) that result from clients closing connections. I believe this is because a lot of clients aren't well-behaved; i.e. they read the HTTP/1.1 response line then close the connection immediately. Using TCP_CORK on Linux for sockets might help there, but it's not a general solution. Also, I'm not really sure if these exceptions should be caught here or just left to subclasses to deal with... |
Logged In: YES Thanks for the patch. Applied as aseHTTPServer.py 1.19, |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: