Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gzipped content support #368

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments
Open

Gzipped content support #368

GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I see that there were numerous requests to have gzipped files served via 
mongoose. This is my solution, as I also needed to serve content from my 
embedded equipment through a sloooow GPRS link. The concept is as follows:

Check request header for Allow-Encoding:gzip, if it is found, then when you 
want to open the file to send, check if there is a copy of the same file with a 
'.gz' extension, if so, serve that one instead, update the Content-Length 
parameter to reflect the shorter file and add an extra line 'Content-Encoding: 
gzip\r\n' to the response header.

The attatched file is my attempt at providing this feature, to use it,
replace the 'handle_file_request()' function in mongoose.c with my version, 
NOTE! Not implemented for ssi.

Have tested it in windows (VC6) and on linux on arm9 embedded platform.

Original issue reported on code.google.com by [email protected] on 26 Jun 2012 at 4:39

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant