file handle should support customized encoding type in http response head
efancier-cn opened this issue · comments
efancier commented
For single file web application, the common way to reduce the loading time is gzip the index.htm file and set the encoding field in response head, this also help embedded linux to reduce file system size - some of the cost sensitive embedded linux system use 32MB spi flash for bootloader, kernel and file system.
Alex Hansen commented
You could accomplish this with middleware or accessing/constructing the headers on the response directly -- it is just a Hyper response. You could then gzip the response body bytes with something like flate-2.