MicroWebSrv2
MicroWebSrv2 copied to clipboard
proof of concept to serve compressed files
Just wanted some feedback on whether this is the right way to go.
any feedback is welcome
Any updates on this?
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.
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 !!!