On Sat, Sep 15, 2001 at 03:15:58PM -0400, Cliff Woolley wrote:
> On Sat, 15 Sep 2001 [EMAIL PROTECTED] wrote:
> 
> > We decided not to wait any longer for a new BETA.
> >
> > Attached is the current source code for mod_gzip
> > for Apache 2.x series. It has been tested
> > pretty heavily and seems to be working fine.
> >
> > There is only 1 file... mod_gzip.c.
> >
> > You are free to do whatever you like with this
> > submission.
> 
> Thanks Kevin.
> 
> 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

Quick comments.

- For Ian's mod_gz, I removed the dependency on zutil.h as it is static
  and OS_CODE seems to defined as part of the RFC (I may be wrong here).
  Most installations do not include zutil.h in their install (such as
  Solaris), so we can't expect it to be there.  This *may* require 
  adding the zlib license for those chunk of lines.  It seems to be a flaw 
  in zlib that they require an internal definition for actual use.

- I dunno what the _set variables are either.  Do we need them?

- The str* funcs are thread-safe on any platform we care about.
  If the libc implementations aren't thread-safe, there are other
  problems that we'll have in the core that mod_gzip's thread-safety
  will be the least of our problems.

- npp isn't completely bogus - I did essentially the same thing in
  flood.  I did:
    r->uri ? r->uri : ""
  instead.  No need for a separate function though.

- I think the IMAP_* stuff can be handled better by the filter directive
  syntax.  Ideally, mod_gz{ip} would be configured as a filter for
  certain mime types or extensions.  Not sure we need to complicate things 
  by allowing inclusion/exclusion via other config syntaxes.

- I don't understand why we need do_command.

- I don't think we need the eligibility checks either.  The mod_mime
  and core should handle this.

- I don't think we need the handler either.

Enough for now.  I need to go to bed.  I'm jet-lagged...  

I'll test it out later this week.  Once I test this implementation,
I'll see which one I like better.  =-)  -- justin

Reply via email to