[Python-ideas] HTTP compression support for http.server
rosuav at gmail.com
Mon Jul 24 12:30:53 EDT 2017
On Tue, Jul 25, 2017 at 2:20 AM, Chris Barker <chris.barker at noaa.gov> wrote:
> On Thu, Jul 20, 2017 at 12:15 AM, Pierre Quentel <pierre.quentel at gmail.com>
>> - if so, should it be supported by default ? It is the case in the PR,
>> where a number of content types, eg text/html, are compressed if the user
>> agent accepts the gzip "encoding"
> I'm pretty wary of compression happening by default -- i.e. someone runs
> exactly the same code with a newer version of Python, and suddenly some
> content is getting compressed.
FWIW I'm quite okay with that. HTTP already has a mechanism for
negotiating compression (Accept-Encoding), designed to be compatible
with servers that don't support it. Any time a server gains support
for something that clients already support, it's going to start
happening as soon as you upgrade.
Obviously this kind of change won't be happening in a bugfix release
of Python, so it would be part of the regular checks when you upgrade
from 3.6 to 3.7 - it'll be in the NEWS file and so on, so you read up
on it before you upgrade.
More information about the Python-ideas