MicroWebSrv2 icon indicating copy to clipboard operation
MicroWebSrv2 copied to clipboard

proof of concept to serve compressed files

Open aguaviva opened this issue 3 years ago • 4 comments

Just wanted some feedback on whether this is the right way to go.

aguaviva avatar Feb 18 '22 00:02 aguaviva

any feedback is welcome

aguaviva avatar Feb 18 '22 00:02 aguaviva

Any updates on this?

aguaviva avatar Sep 17 '22 17:09 aguaviva

Hello @aguaviva and sorry for the time :) Yes it's cool, but just : Could you add the support (the case) of Accept-Encoding header in request before return a compressed file ? Developer.Mozilla: Accept-Encoding You can use self._request.GetHeader('Accept-Encoding') to get values or None.

jczic avatar Sep 17 '22 19:09 jczic

Supporting "Accept-Encoding" is the wrong idea.

Compression is needed to SAVE SPACE on the microcontroller, so there is NEVER any situation when non-compressed alternative content will get served to the browser. All browsers ALWAYS supports compression, even if it never said "Accept-Encoding" in the first place.

Nobody wants to store a second uncompressed copy of their files on their MCU of course !!!

gitcnd avatar Oct 28 '23 02:10 gitcnd