Cliff Woolley wrote:
> On Sat, 15 Sep 2001 [EMAIL PROTECTED] wrote:
>
> I took the liberty of applying a good dose of Apache stylistic rules
> (might have still missed some things, but I tried). I also removed some
> more debug stuff (the r->notes things) since none of it ever seemed to be
> really used. I removed the ZLIB license since I don't think any of this
> code actually came from ZLIB. The fact that it uses zutil.h is immaterial
> AFAIK. If I'm wrong, somebody tell me and I'll put the ZLIB license back
> in. I also removed some of the verbose comments... I think it's easier to
> read with fewer comments in some places. I took out the version numbering
> since it'd be hard to keep that in-sync if this were in the actual
> httpd-2.0 tree. It makes sense for a 3rd party module, but not for an
> official module. I cleaned up a few logic things, but I tried my best not
> to change any functionality. I did, however, strip out the handling of
> the deprecated commands... if they're deprecated, that can be documented,
> but IMO there's no need to handle them just to print out an error that
> says "this isn't supported anymore". Where I had problems with/questions
> about things, I put in an #error so I couldn't forget to take care of
> them. (They should be easily taken care of.) Because of the #error
> additions and the fact that I'm out of time to work on this for the day, I
> haven't even tried compiling this, so there's the possibility I made some
> stupid mistakes. I'll get back to it later no doubt, but if someone else
> would care to take the next turn at looking over it, I'd appreciate it.
>
> To save bandwidth, my version is here:
> http://www.apache.org/~jwoolley/mod_gzip.c
>
> --Cliff
additional comments (my 2c)
* Caching should be removed (there is another caching module there
it should use that), failing that, maybe it should be split out to
a different filter
* functions should be static
* why are you defining your own strncmp??
* logging should be via the logging optional function
* flushing should probably flush the zlib buffer before sending it out
* only check if gzip is on ONCE per request. (ie if (!f->ctx)) and if you don't want
it enabled remove it from the filter chain.
* remove the de-chunking, you won't see this anyway
* remove the 'enable' flag. if the user has setoutputfilter'd it he wants it
* the filter should be a HTTP_HEADER not a content one.
* the filter should only be run on a 'main' request (do you check this?)
otherwise you will have a gzip'ed included file in a non-gziped main file.
..Ian
>
> --------------------------------------------------------------
> Cliff Woolley
> [EMAIL PROTECTED]
> Charlottesville, VA
>
>