-->
Page 3 of 4

Re: Patch files

PostPosted: Fri Apr 10, 2015 5:43 pm
by dzindra
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.

Re: Patch files

PostPosted: Sat Apr 11, 2015 2:22 am
by Sprite_tm
Thanks, this applies cleanly. Merged and committed.

Re: Patch files

PostPosted: Sat Apr 11, 2015 6:50 pm
by dzindra
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?

Re: Patch files

PostPosted: Sun Apr 12, 2015 5:23 am
by Sprite_tm
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.