ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By dzindra
#14146
Sprite_tm wrote:dzindra: The commit you based your changes on is dated April the 3rd. I've committed multiple commits since then; you'll need to rebase your Git tree against those changes for the patch set to apply cleanly to the current head.


Ok, I tried to rebase all changes to your current master. In addition to past changes I added espFsInit function that allows to get rid of hardcoded address of espfs image. Hopefully it will merge cleanly now. Pull request file attached.
You do not have the required permissions to view the files attached to this post.
User avatar
By dzindra
#14228
Sprite_tm wrote:Thanks, this applies cleanly. Merged and committed.


Nice, thank you. I've made another bunch of changes today - some minor things and a bit different handling of gzip compressed files. Code can be checked at https://github.com/dzindra/esphttpd/tree/better-gzip - untested for now, but should be complete enough to get the idea.

I've chosen a bit different approach - instead of relying on file extensions in server code and hoping actual files will be gzipped, I added FLAG_GZIP to espfs file header flags. Extension checking and gzipping is done in mkespfsimage (which now depends on zlib if gziping is enabled).

This way, gziped files are easily recognized and because they have COMPRESSION_NONE set, server code will simply pass them to client with some extra headers (the check for clients not supporting gzip stays in place).

What is your opinion on these changes?
User avatar
By Sprite_tm
#14261 Ooh, that indeed is a pretty nice way to handle things. I also saw you needed to fix some snafus I made in the Makefile, my apologies for those... I'll commit the changes today or tomorrow.