<div dir="ltr">The opinion of some random guy on the list...<div><br></div><div><div>On Thu, Jul 20, 2017 at 12:15 AM, Pierre Quentel <span dir="ltr"><<a href="mailto:pierre.quentel@gmail.com" target="_blank">pierre.quentel@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I have been suggested to require feedback from core devs :<br>- should HTTP compression be supported ?<br></div></blockquote><div><br></div><div>Yes. You are quite right, it's pretty standard stuff these days.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">- 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"<br></div></blockquote><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">- if not, should the implementation of http.server be adapted so that subclasses could implement it ? For the moment the only way to add it is to modify method send_head() of SimpleHTTPRequestHandler<br></div></blockquote><div><br></div><div>sure -- though it would be nice for folks to be able to use compression without going through that process.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The implementation is based on a list of types to compress (SimpleHTTPServer.compressed_<wbr>types) that can be modified at will, eg set to the empty list to disable compression.</div></blockquote><div><br></div><div>How about having it be an empty list by default and have one or more lists of common types be pre-populated and available in the SimpleHTTPServer namespace. that is:</div><div><br></div><div>SimpleHTTPServer.compressed_<wbr>types = SimpleHTTPServer.standard_compressed_types<br></div><div><br></div><div>Or may be a method to turn on the "standard" set -- though if it really is simply a list, better to expose that so it's obvious that you can create your own list or examine and edit the existing one(s).<br></div><div><br></div><div>Thanks for doing this -- nice feature!</div><div><br></div><div>-CHB</div><div><br></div><div><br></div></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>