Pierre Quentel added the comment:

I propose this as a minor improvement to the built-in server, like the support 
of browser cache that will be included in Python 3.7 (issue #29654, PR #298). I 
understand that the server is not supposed to be full-featured, but HTTP 
compression is widespread, reduces network load and is easy to implement (the 
code will be very similar to SimpleXMLRPCRequestHandler).

Content-Encoding is used because it's the most simple to implement. Chunked 
transfer for large amount of data seems to me to be out of the scope of the 
built-in server.

Content-Length is set to the length of the compressed data. I don't understand 
your question about persistent connections : the proposal covers a single 
request / response sequence, it doesn't depend on the underlying TCP connection 
being reused or not.

>From what I understand, issue #1508475 refers to the http client, not server ; 
>and #4733 refers to another meaning of encoding (conversion from characters to 
>bytes with a charset such as utf-8), not to HTTP compression, which 
>unfortunately also uses "encoding" in headers names.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to