/[Apache-SVN]/httpd/httpd/trunk/modules/filters/mod_deflate.c
ViewVC logotype

Log of /httpd/httpd/trunk/modules/filters/mod_deflate.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 821471 - (view) (annotate) - [select for diffs]
Modified Sun Oct 4 07:37:28 2009 UTC (7 weeks ago) by sf
File length: 50211 byte(s)
Diff to previous 743814 (colored)
core, mod_deflate, mod_sed: Reduce memory usage by reusing bucket
brigades in several places

Revision 743814 - (view) (annotate) - [select for diffs]
Modified Thu Feb 12 17:43:39 2009 UTC (9 months, 1 week ago) by fielding
File length: 50297 byte(s)
Diff to previous 743595 (colored)
Adjust content metadata on deflate/inflate response before bailing out
on a 304 response so that the metadata does not differ from 200 response.

Revision 743595 - (view) (annotate) - [select for diffs]
Modified Thu Feb 12 01:59:27 2009 UTC (9 months, 1 week ago) by fielding
File length: 50355 byte(s)
Diff to previous 741865 (colored)
Reimplement deflate_check_etag() so that it isn't such a pig
and correctly works with weak etags.  Related to PR 39727.

Note that there remains an error in ap_meets_conditions because
that function does not currently check for a transformed etag.
I am working on that.

Revision 741865 - (view) (annotate) - [select for diffs]
Modified Sat Feb 7 09:25:28 2009 UTC (9 months, 2 weeks ago) by rpluem
File length: 49774 byte(s)
Diff to previous 740149 (colored)
* Only drop the last char (the '"') and not the last one of the etag itself.

Revision 740149 - (view) (annotate) - [select for diffs]
Modified Mon Feb 2 23:20:37 2009 UTC (9 months, 2 weeks ago) by lars
File length: 49774 byte(s)
Diff to previous 726794 (colored)
mod_deflate: Fix creation of invalid Etag headers. We now make sure
that the Etag value is properly quoted when adding the gzip marker.
PR 39727.

Revision 726794 - (view) (annotate) - [select for diffs]
Modified Mon Dec 15 20:36:47 2008 UTC (11 months, 1 week ago) by rpluem
File length: 49690 byte(s)
Diff to previous 726791 (colored)
* Fix r->content_encoding for inflate_in and inflate_out filters.

Revision 726791 - (view) (annotate) - [select for diffs]
Modified Mon Dec 15 20:22:07 2008 UTC (11 months, 1 week ago) by rpluem
File length: 49270 byte(s)
Diff to previous 607219 (colored)
*  Fix r->content_encoding in deflate_out_filter if it was set before.

Revision 607219 - (view) (annotate) - [select for diffs]
Modified Fri Dec 28 12:03:20 2007 UTC (22 months, 3 weeks ago) by niq
File length: 49033 byte(s)
Diff to previous 581198 (colored)
PR 39727: Fixup ETag handling in mod deflate (updated following extensive
discussion on-list).
This is not a full-and-final fix, because we don't ourselves do anything
useful with these ETags.  But at least we're no longer screwing up clients.

Revision 581198 - (view) (annotate) - [select for diffs]
Modified Tue Oct 2 11:48:03 2007 UTC (2 years, 1 month ago) by niq
File length: 49277 byte(s)
Diff to previous 580598 (colored)
mod_deflate: Don't leave a strong ETag in place while transforming the entity.
PR 39727

Comment: Another user just subscribed to this bug.
We need a fix more than we need an inconclusive discussion!

Revision 580598 - (view) (annotate) - [select for diffs]
Modified Sat Sep 29 15:43:08 2007 UTC (2 years, 1 month ago) by niq
File length: 48219 byte(s)
Diff to previous 563803 (colored)
mod_deflate: initialise inflate-out filter correctly when the
first brigade contains no data buckets.
PR 43512

Revision 563803 - (view) (annotate) - [select for diffs]
Modified Wed Aug 8 10:39:23 2007 UTC (2 years, 3 months ago) by niq
File length: 48213 byte(s)
Diff to previous 563317 (colored)
Correcting defects in r563317: fix to PR 42993

Revision 563317 - (view) (annotate) - [select for diffs]
Modified Mon Aug 6 22:45:39 2007 UTC (2 years, 3 months ago) by niq
File length: 47668 byte(s)
Diff to previous 563230 (colored)
Check all sources of Content-Encoding in inflate_out filter
PR 42993
Reasoning: http://marc.info/?l=apache-httpd-dev&m=118643107831358&w=2

Revision 563230 - (view) (annotate) - [select for diffs]
Modified Mon Aug 6 19:24:10 2007 UTC (2 years, 3 months ago) by rpluem
File length: 47368 byte(s)
Diff to previous 563229 (colored)
* Also unset Content-MD5 in the deflate_out_filter

Revision 563229 - (view) (annotate) - [select for diffs]
Modified Mon Aug 6 19:22:23 2007 UTC (2 years, 3 months ago) by rpluem
File length: 47312 byte(s)
Diff to previous 563154 (colored)
* We already unset Content-Length in the inflate_out_filter. So move the
  comment and unsetting of Content-MD5 in the right place.

Revision 563154 - (view) (annotate) - [select for diffs]
Modified Mon Aug 6 14:37:42 2007 UTC (2 years, 3 months ago) by niq
File length: 47365 byte(s)
Diff to previous 563133 (colored)
Don't try to compress/decompress where there's a Content-Range.
According to RFC2616, the range would have to apply *after*
applying content-encoding, so anything that's been set before
running the deflate filter is going to be broken.


Revision 563133 - (view) (annotate) - [select for diffs]
Modified Mon Aug 6 13:53:35 2007 UTC (2 years, 3 months ago) by niq
File length: 46802 byte(s)
Diff to previous 562507 (colored)
mod_deflate - discussion on dev@
Postpone unsetting of headers until after first get_brigade from upstream

Revision 562507 - (view) (annotate) - [select for diffs]
Modified Fri Aug 3 15:42:30 2007 UTC (2 years, 3 months ago) by niq
File length: 46801 byte(s)
Diff to previous 560941 (colored)
Generalise the content encoding detection and protocol:
so it aslo works in inflate out filter, as suggested by rpluem.

NOTE: this fails with some generators (cgi, asis) due to a deeper bug:
content-encoding is set later than mod_deflate sees it.  This has always
been the case, and could use a separate fix if anyone wants inflate_out
other than in a proxy situation.  And it's not mod_deflate's problem.

Revision 560941 - (view) (annotate) - [select for diffs]
Modified Mon Jul 30 12:30:36 2007 UTC (2 years, 3 months ago) by niq
File length: 47158 byte(s)
Diff to previous 560937 (colored)
Be liberal in what we accept.  Where it matters.

Revision 560937 - (view) (annotate) - [select for diffs]
Modified Mon Jul 30 12:24:49 2007 UTC (2 years, 3 months ago) by niq
File length: 47107 byte(s)
Diff to previous 560811 (colored)
Be liberal and correct in what we accept

Revision 560811 - (view) (annotate) - [select for diffs]
Modified Sun Jul 29 20:47:44 2007 UTC (2 years, 3 months ago) by niq
File length: 46903 byte(s)
Diff to previous 560689 (colored)
Update r560689 following rpluem's analysis thereof.

Revision 560689 - (view) (annotate) - [select for diffs]
Modified Sun Jul 29 08:35:56 2007 UTC (2 years, 3 months ago) by niq
File length: 47132 byte(s)
Diff to previous 556113 (colored)
Fix protocol handling in mod_deflate input filter
PR 23287

Revision 556113 - (view) (annotate) - [select for diffs]
Modified Fri Jul 13 19:23:24 2007 UTC (2 years, 4 months ago) by gregames
File length: 45461 byte(s)
Diff to previous 556028 (colored)
don't need the definitions for error buckets any more

Revision 556028 - (view) (annotate) - [select for diffs]
Modified Fri Jul 13 15:11:16 2007 UTC (2 years, 4 months ago) by gregames
File length: 45488 byte(s)
Diff to previous 554011 (colored)
* generalize from error buckets to metadata buckets
* also applicable to the deflate input filter
* pass along metadata buckets rather than giving up mid-stream

vastly improved by: Rüdiger Plüm

Revision 554011 - (view) (annotate) - [select for diffs]
Modified Fri Jul 6 19:36:30 2007 UTC (2 years, 4 months ago) by gregames
File length: 45057 byte(s)
Diff to previous 476600 (colored)
with LimitRequestBody xxx and the deflate output filter configured, mod_deflate
eats the 413 error bucket, a 500 error is logged, and a blank screen appears
at the browser.

Revision 476600 - (view) (annotate) - [select for diffs]
Modified Sat Nov 18 20:26:28 2006 UTC (3 years ago) by niq
File length: 44893 byte(s)
Diff to previous 475922 (colored)
Housekeeping: keep track of size even in the edge-case where validation
bytes trickle in over multiple buckets.

Revision 475922 - (view) (annotate) - [select for diffs]
Modified Thu Nov 16 20:45:39 2006 UTC (3 years ago) by rpluem
File length: 44833 byte(s)
Diff to previous 475920 (colored)
* Fix some comments. No functional change.

Revision 475920 - (view) (annotate) - [select for diffs]
Modified Thu Nov 16 20:41:06 2006 UTC (3 years ago) by rpluem
File length: 44843 byte(s)
Diff to previous 475915 (colored)
* Also log the presence of garbage data at the end of the stream if all
  validation data is available in the first round.

Revision 475915 - (view) (annotate) - [select for diffs]
Modified Thu Nov 16 20:30:25 2006 UTC (3 years ago) by rpluem
File length: 44570 byte(s)
Diff to previous 475406 (colored)
* Actually append new data to the validation buffer and do not overwrite old
  data already there by setting the correct offset for the target buffer.

Revision 475406 - (view) (annotate) - [select for diffs]
Modified Wed Nov 15 20:26:10 2006 UTC (3 years ago) by rpluem
File length: 44355 byte(s)
Diff to previous 475403 (colored)
* Ensure that we do not perform our final operations twice if a second EOS
  falls down the chain by accident. Otherwise we are likely to run in a
  SEGFAULT. So remove ourselves from the chain.

Revision 475403 - (view) (annotate) - [select for diffs]
Modified Wed Nov 15 20:19:37 2006 UTC (3 years ago) by rpluem
File length: 44108 byte(s)
Diff to previous 426799 (colored)
* Ensure that we do not try to inflate validation data or garbage data. None
  of this is zlib's business.

Revision 426799 - (view) (annotate) - [select for diffs]
Modified Sat Jul 29 13:24:37 2006 UTC (3 years, 3 months ago) by rpluem
File length: 43693 byte(s)
Diff to previous 426795 (colored)
* Rework inflate out filter and give it a similar workflow as the deflate out
  filter. This fixes the following bugs in the inflate out filter:

  - Incorrect handling of flush buckets.
  - Excessive memory usage for large compressed content (because we now
    already sent parts down the chain and do not process the whole brigade
    first before sending something down the chain).
  - Handle the case correctly where the validation bytes at the end of
    the compressed data stream are distributed across different buckets /
    brigades.
  - Fix a memory leak due to not cleaning up the internal structures of
    libz in some error cases.

PR: 39854

Revision 426795 - (view) (annotate) - [select for diffs]
Modified Sat Jul 29 13:08:38 2006 UTC (3 years, 3 months ago) by rpluem
File length: 40370 byte(s)
Diff to previous 426793 (colored)
* some optimizations taken from the inflate out filter

Revision 426793 - (view) (annotate) - [select for diffs]
Modified Sat Jul 29 13:03:43 2006 UTC (3 years, 3 months ago) by rpluem
File length: 40347 byte(s)
Diff to previous 426791 (colored)
* We can ignore Z_BUF_ERROR in flush_libz_buffer because:
  When we call libz_func we can assume that

   - avail_in is zero (due to the surrounding code that calls
     flush_libz_buffer)
   - avail_out is non zero due to the fact that we just emptied
     the output buffer and stored it into a brigade

  So the only reason for Z_BUF_ERROR is that the internal libz
  buffers are now empty and thus we called libz_func one time
  too often. This does not hurt. It simply says that we are done.

Revision 426791 - (view) (annotate) - [select for diffs]
Modified Sat Jul 29 12:55:26 2006 UTC (3 years, 3 months ago) by rpluem
File length: 39787 byte(s)
Diff to previous 426790 (colored)
* Use a define for the number of validation bytes (CRC and length) after the
  compressed data

Revision 426790 - (view) (annotate) - [select for diffs]
Modified Sat Jul 29 12:49:51 2006 UTC (3 years, 3 months ago) by rpluem
File length: 39618 byte(s)
Diff to previous 425109 (colored)
* Add parameter crc to flush_libz_buffer in order to call the libz's crc32
  function on the output buffer if needed. This is actually needed by the
  later rework of the inflate out filter.

Revision 425109 - (view) (annotate) - [select for diffs]
Modified Mon Jul 24 16:17:12 2006 UTC (3 years, 4 months ago) by rpluem
File length: 38935 byte(s)
Diff to previous 424950 (colored)
* Rather use a pool cleanup function than calling deflateEnd before every
  return from function to ensure that libz's internals get cleaned up.

Revision 424950 - (view) (annotate) - [select for diffs]
Modified Mon Jul 24 07:43:40 2006 UTC (3 years, 4 months ago) by rpluem
File length: 39942 byte(s)
Diff to previous 424759 (colored)
* Initialize zRC to avoid a compiler warning.

Revision 424759 - (view) (annotate) - [select for diffs]
Modified Sun Jul 23 15:50:08 2006 UTC (3 years, 4 months ago) by rpluem
File length: 39935 byte(s)
Diff to previous 423940 (colored)
* This shortcut is too short. It is not up to the filters to decide
  whether filters down the chain can do something useful with this empty
  brigade.

Revision 423940 - (view) (annotate) - [select for diffs]
Modified Thu Jul 20 14:11:48 2006 UTC (3 years, 4 months ago) by rpluem
File length: 39901 byte(s)
Diff to previous 422739 (colored)
* In preparation of the changes of the inflate out filter:
  - rename flush_zlib_buffer to flush_libz_buffer (this name seems
    better)
  - add a parameter to tell flush_libz_buffer whether it should
    deflate or inflate as this function should be also used for the
    inflate out filter.

Revision 422739 - (view) (annotate) - [select for diffs]
Modified Mon Jul 17 15:24:29 2006 UTC (3 years, 4 months ago) by rpluem
File length: 39811 byte(s)
Diff to previous 422736 (colored)
* Remove ourselves from the filter chain if we failed to init libz, as we
  pass data down the filter chain uncompressed afterwards.

Revision 422736 - (view) (annotate) - [select for diffs]
Modified Mon Jul 17 15:08:27 2006 UTC (3 years, 4 months ago) by rpluem
File length: 39596 byte(s)
Diff to previous 422731 (colored)
* Fix potential memory leaks in deflate_out_filter if bailing out due to an
  error (either in the lower filter chain or during a libz operation). We need
  to call deflateEnd as it is very likely that this filter is never called
  again to ensures that libz's internal structures get cleaned properly.

Revision 422731 - (view) (annotate) - [select for diffs]
Modified Mon Jul 17 14:32:50 2006 UTC (3 years, 4 months ago) by rpluem
File length: 37940 byte(s)
Diff to previous 420983 (colored)
* Fix wrong FLUSH bucket handling in deflate_out_filter: Actually the internal
  structures of libz never got flushed as ctx->stream.avail_in is always zero
  here. As the EOS and the FLUSH bucket case use the same code for flushing
  libz's internal buffers move this code to the new function flush_zlib_buffer.

Revision 420983 - (view) (annotate) - [select for diffs]
Modified Tue Jul 11 20:33:53 2006 UTC (3 years, 4 months ago) by fielding
File length: 38125 byte(s)
Diff to previous 416165 (colored)
update license header text

Revision 416165 - (view) (annotate) - [select for diffs]
Modified Wed Jun 21 23:16:47 2006 UTC (3 years, 5 months ago) by niq
File length: 37978 byte(s)
Diff to previous 395228 (colored)
PR#39854
Remove bogus code that chokes on flush buckets

Revision 395228 - (view) (annotate) - [select for diffs]
Modified Wed Apr 19 12:11:27 2006 UTC (3 years, 7 months ago) by colm
File length: 38774 byte(s)
Diff to previous 395079 (colored)
Update the copyright year in all .c, .h and .xml files

Revision 395079 - (view) (annotate) - [select for diffs]
Modified Tue Apr 18 22:51:55 2006 UTC (3 years, 7 months ago) by colm
File length: 38774 byte(s)
Diff to previous 332306 (colored)
Correctly handle internal redirects, by testing only for r-main == NULL.
ap_is_initial_req() returns false for internal redirects.

Revision 332306 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:11:44 2005 UTC (4 years ago) by jim
File length: 38780 byte(s)
Diff to previous 161738 (colored)
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines

Revision 161738 - (view) (annotate) - [select for diffs]
Modified Mon Apr 18 06:08:56 2005 UTC (4 years, 7 months ago) by pquerna
File length: 38808 byte(s)
Diff to previous 161691 (colored)
- mod_deflate currently only does C-E, and not T-E. Fix the comment at the top saying it does T-E.

Revision 161691 - (view) (annotate) - [select for diffs]
Modified Sun Apr 17 20:25:57 2005 UTC (4 years, 7 months ago) by pquerna
File length: 38809 byte(s)
Diff to previous 151408 (colored)
mod_deflate should be merging the Vary header, not Setting it, and ignoring what other modules put there.

Spotted By: Rici Lake

Revision 151408 - (view) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (4 years, 9 months ago) by jerenkrantz
File length: 38807 byte(s)
Diff to previous 109500 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.

Revision 109500 - (view) (annotate) - [select for diffs]
Modified Thu Dec 2 13:45:32 2004 UTC (4 years, 11 months ago) by jorton
File length: 38771 byte(s)
Diff to previous 106103 (colored)
* modules/filters/mod_deflate.c (deflate_out_filter): Check explicitly
for a 304 or 204 response rather than a brigade which begins with EOS,
to correctly handle such responses when generated by a CGI script.
Don't alter the headers for this case either.

Revision 106103 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (5 years ago) by nd
File length: 39172 byte(s)
Diff to previous 105410 (colored)
general property cleanup

Revision 105410 - (view) (annotate) - [select for diffs]
Modified Tue Oct 12 11:40:00 2004 UTC (5 years, 1 month ago) by jorton
File length: 39172 byte(s)
Diff to previous 105403 (colored)
* modules/filters/mod_deflate.c: Remove use of zutil.h (not installed
by zlib 1.2.1) and OS_CODE.  (deflate_out_filter): Simplify to use an
immortal brigade for the gzip header.

PR: 28673

Revision 105403 - (view) (annotate) - [select for diffs]
Modified Mon Oct 11 10:46:17 2004 UTC (5 years, 1 month ago) by pquerna
File length: 40420 byte(s)
Diff to previous 104352 (colored)
Use the ap_is_initial_req() function to test for a subrequest instead of using r->main.

Revision 104352 - (view) (annotate) - [select for diffs]
Modified Fri Jul 23 12:40:49 2004 UTC (5 years, 4 months ago) by niq
File length: 40378 byte(s)
Diff to previous 104318 (colored)
Tidy up handling of empty brigades (Joe Orton);
Ensure we still set headers on HEAD and 204/304;
and fix inflate_out_filter handling of HEAD/etc.

Revision 104318 - (view) (annotate) - [select for diffs]
Modified Sun Jul 18 01:18:58 2004 UTC (5 years, 4 months ago) by niq
File length: 40525 byte(s)
Diff to previous 104315 (colored)
Tidy up: get rid of dubious cast (nd) and initialise encoding.

Revision 104315 - (view) (annotate) - [select for diffs]
Modified Sat Jul 17 15:22:35 2004 UTC (5 years, 4 months ago) by niq
File length: 40465 byte(s)
Diff to previous 104314 (colored)
Fix previous patch to deal correctly with multiple empty brigades before
we know if there's any content, and not re-process the headers.

Revision 104314 - (view) (annotate) - [select for diffs]
Modified Sat Jul 17 14:14:11 2004 UTC (5 years, 4 months ago) by niq
File length: 40069 byte(s)
Diff to previous 104166 (colored)
Fix headers in deflate_out_filter for the case of an empty first brigade

Revision 104166 - (view) (annotate) - [select for diffs]
Modified Sun Jul 4 21:34:37 2004 UTC (5 years, 4 months ago) by nd
File length: 39651 byte(s)
Diff to previous 104155 (colored)
style

Revision 104155 - (view) (annotate) - [select for diffs]
Modified Sat Jul 3 17:41:09 2004 UTC (5 years, 4 months ago) by nd
File length: 39655 byte(s)
Diff to previous 104034 (colored)
that's not really an error condition, so make the message APLOG_DEBUG.

Revision 104034 - (view) (annotate) - [select for diffs]
Modified Fri Jun 25 03:44:29 2004 UTC (5 years, 4 months ago) by niq
File length: 39653 byte(s)
Diff to previous 103910 (colored)
Update inflate_out_filter to support gzip compression flags.

Revision 103910 - (view) (annotate) - [select for diffs]
Modified Fri Jun 11 19:44:23 2004 UTC (5 years, 5 months ago) by ake
File length: 37898 byte(s)
Diff to previous 103810 (colored)
Don't deflate responses with zero length e.g. proxied 304's

Revision 103810 - (view) (annotate) - [select for diffs]
Modified Tue Jun 1 13:06:10 2004 UTC (5 years, 5 months ago) by jorton
File length: 37410 byte(s)
Diff to previous 103803 (colored)
* modules/filters/mod_deflate.c (deflate_out_filter): Destroy buckets
immediately after are used so that memory consumption is not
proportional to the size of the response.

PR: 29318

Revision 103803 - (view) (annotate) - [select for diffs]
Modified Sat May 29 03:34:17 2004 UTC (5 years, 5 months ago) by jerenkrantz
File length: 37382 byte(s)
Diff to previous 103476 (colored)
Fix bug in mod_deflate that unconditionally sent deflate'd output even when
Accept-Encoding is not present.

Reported by Roy Fielding for http://cvs.apache.org/viewcvs/ with Safari.

Revision 103476 - (view) (annotate) - [select for diffs]
Modified Wed Apr 21 22:08:34 2004 UTC (5 years, 7 months ago) by nd
File length: 37389 byte(s)
Diff to previous 103420 (colored)
content-encoding needs to be unset.

Submitted by: Nick Kew <nick webthing.com>

Revision 103420 - (view) (annotate) - [select for diffs]
Modified Sat Apr 17 00:26:52 2004 UTC (5 years, 7 months ago) by nd
File length: 37328 byte(s)
Diff to previous 103405 (colored)
remove unused variables

Revision 103405 - (view) (annotate) - [select for diffs]
Modified Fri Apr 16 05:12:22 2004 UTC (5 years, 7 months ago) by ianh
File length: 37369 byte(s)
Diff to previous 102618 (colored)
mod_deflate:
- New option for DEFLATE output file (force-gzip), which skips checking the accept-encoding header.
- New output filter 'INFLATE' for uncompressing responses.

Submitted by:   Nick Kew <Nick at WebThing dot com>
Reviewed by:    Ian Holsman

Revision 102618 - (view) (annotate) - [select for diffs]
Modified Mon Feb 9 20:31:03 2004 UTC (5 years, 9 months ago) by nd
File length: 29659 byte(s)
Diff to previous 102562 (colored)
fix name of The Apache Software Foundation

Revision 102562 - (view) (annotate) - [select for diffs]
Modified Sun Feb 8 12:00:07 2004 UTC (5 years, 9 months ago) by nd
File length: 29655 byte(s)
Diff to previous 102525 (colored)
fix copyright dates according to the first checkin

Revision 102525 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (5 years, 9 months ago) by nd
File length: 29655 byte(s)
Diff to previous 102207 (colored)
apply Apache License, Version 2.0

Revision 102207 - (view) (annotate) - [select for diffs]
Modified Tue Jan 6 21:50:58 2004 UTC (5 years, 10 months ago) by ianh
File length: 31676 byte(s)
Diff to previous 102135 (colored)
remove email address in the hopes ppl stop emailing me directly ;(

Revision 102135 - (view) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (5 years, 10 months ago) by nd
File length: 31694 byte(s)
Diff to previous 101788 (colored)
update license to 2004.

Revision 101788 - (view) (annotate) - [select for diffs]
Modified Sun Nov 16 02:09:14 2003 UTC (6 years ago) by jwoolley
File length: 31694 byte(s)
Diff to previous 101019 (colored)
get rid of _FOREACH

Revision 101019 - (view) (annotate) - [select for diffs]
Modified Tue Aug 19 14:56:12 2003 UTC (6 years, 3 months ago) by nd
File length: 31507 byte(s)
Diff to previous 101015 (colored)
here applies the same. Don't skip the \0 delimiter when searching
for already applied encodings. Additionally don't compress if *any*
non-identity encoding was applied before. (deflate, pkzip, whatever).

Revision 101015 - (view) (annotate) - [select for diffs]
Modified Tue Aug 19 12:26:38 2003 UTC (6 years, 3 months ago) by nd
File length: 31275 byte(s)
Diff to previous 100966 (colored)
Doh. If Accept-Encoding contains no gzip token, we skip the 0 delimiter
and search for "gzip" somehwere in the memory. This was originally discovered
by Joe Orton. But there's more. We must skip any parameters, since these
do not contain what we're looking for.

PR: 21523

Revision 100966 - (view) (annotate) - [select for diffs]
Modified Tue Aug 12 17:46:29 2003 UTC (6 years, 3 months ago) by stas
File length: 30993 byte(s)
Diff to previous 100730 (colored)
     Fix bug in mod_deflate, which was passing calling deflate()
     without checkinig first whether it has something to deflate. (currently
     this causes deflate to generate a fatal error according to the zlib spec).
     PR 22259.
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 100730 - (view) (annotate) - [select for diffs]
Modified Tue Jul 22 05:36:54 2003 UTC (6 years, 4 months ago) by jerenkrantz
File length: 30920 byte(s)
Diff to previous 99880 (colored)
Don't attempt to hold all of the response until we're done.  We'll pass data on
when the zlib buffer becomes full and we need to reset the buffer anyway.

Also, tidy up a similar semantic when we see the EOS by returning an error
if ap_pass_brigade gets an error (we'd lose it otherwise).

Revision 99880 - (view) (annotate) - [select for diffs]
Modified Fri May 16 22:49:04 2003 UTC (6 years, 6 months ago) by nd
File length: 30557 byte(s)
Diff to previous 98982 (colored)
Check also for r->content_encoding (now we should have them all...)
for already compressed content in mod_deflate.

PR: 19913
Submitted by: Tsuyoshi SASAMOTO <nazonazo@super.win.ne.jp>

Revision 98982 - (view) (annotate) - [select for diffs]
Modified Tue Mar 11 18:11:33 2003 UTC (6 years, 8 months ago) by ianh
File length: 30313 byte(s)
Diff to previous 98948 (colored)
reflect backport of  mod_deflate.c r1.31
change directive from compressionlevel to deflatecompressionlevel

PR:
Obtained from:
Submitted by:	Ian Holsman, Andre Malo
Reviewed by:

Revision 98948 - (view) (annotate) - [select for diffs]
Modified Sat Mar 8 17:08:34 2003 UTC (6 years, 8 months ago) by nd
File length: 30306 byte(s)
Diff to previous 98895 (colored)
Check also err_headers_out for an already set Content-Encoding:
gzip header. This prevents gzip compressed content from a CGI
script from being compressed once more.

PR: 17797

Revision 98895 - (view) (annotate) - [select for diffs]
Modified Wed Mar 5 22:14:33 2003 UTC (6 years, 8 months ago) by ianh
File length: 29937 byte(s)
Diff to previous 98689 (colored)
new directive 'compressionlevel'
Default compression level now changed to Zlib's default (was 'best_speed')

Obtained from: Stephen Pierzchala <stephen@pierzchala.com> Michael Schroepl <Michael.Schroepl@telekurs.de>
Reviewed by:  Ian Holsman

Revision 98689 - (view) (annotate) - [select for diffs]
Modified Mon Feb 17 04:46:00 2003 UTC (6 years, 9 months ago) by jerenkrantz
File length: 29207 byte(s)
Diff to previous 98573 (colored)
Fix potential memory leaks in mod_deflate on malformed input data.

PR: 16046

Revision 98573 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (6 years, 9 months ago) by nd
File length: 28813 byte(s)
Diff to previous 98154 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))

Revision 98154 - (view) (annotate) - [select for diffs]
Modified Thu Jan 2 21:47:39 2003 UTC (6 years, 10 months ago) by nd
File length: 28813 byte(s)
Diff to previous 98149 (colored)
break down macro code and avoid mixed case.

Thanks to Justin for his hints.

Revision 98149 - (view) (annotate) - [select for diffs]
Modified Wed Jan 1 20:31:37 2003 UTC (6 years, 10 months ago) by nd
File length: 28141 byte(s)
Diff to previous 97526 (colored)
The patch allows the user to log the accurate filter input and
output byte count, instead of only the rounded compression ratio.
The DeflateFilterNote directive will be extended as follows:

DeflateFilterNote [type] name

type can be one of "input", "output" or "ratio". "ratio" is assumed if the
type is omitted (backwards compatible).

Revision 97526 - (view) (annotate) - [select for diffs]
Modified Thu Nov 14 19:22:26 2002 UTC (7 years ago) by jwoolley
File length: 27534 byte(s)
Diff to previous 97473 (colored)
Fix a memory leak in mod_deflate with dynamic content.  Because the
brigade was being destroyed (ie, cleanup unregistered) rather than just
emptied out and then reused anyway, the last call down the filter stack
would leak buckets.

PR: 14321
Submitted by:	Ken Franken <kfranken@decisionmark.com>
Reviewed by:	Jeff Trawick, Cliff Woolley

Revision 97473 - (view) (annotate) - [select for diffs]
Modified Sun Nov 10 06:09:20 2002 UTC (7 years ago) by jerenkrantz
File length: 27534 byte(s)
Diff to previous 96590 (colored)
Always emit Vary header if mod_deflate is involved in the request.

Submitted by:	Andr��Malo <nd@perlig.de>
Reviewed by:	Justin Erenkrantz

Revision 96590 - (view) (annotate) - [select for diffs]
Modified Fri Aug 30 16:31:17 2002 UTC (7 years, 2 months ago) by ianh
File length: 27306 byte(s)
Diff to previous 96588 (colored)
actuall fix the bug

Revision 96588 - (view) (annotate) - [select for diffs]
Modified Fri Aug 30 16:08:03 2002 UTC (7 years, 2 months ago) by ianh
File length: 27290 byte(s)
Diff to previous 96318 (colored)
deflate's filter removal was reversed for non-html files, resulting
in it never being applied for non-html files
Submitted by:	Kris Verbeeck <Kris.Verbeeck@ubizen.com>

Revision 96318 - (view) (annotate) - [select for diffs]
Modified Wed Aug 7 15:26:17 2002 UTC (7 years, 3 months ago) by ianh
File length: 27291 byte(s)
Diff to previous 95906 (colored)
mod-deflate now checks to make sure gzip-only-text-html is set to 1, not anything.
This will allow things like...
SetEnv gzip-only-text/html 1
BrowserMatch "GECKO" gzip-only-text/html=0

Obtained from: Andr� Schild <A.Schild@aarboard.ch>
Reviewed by:   Ian Holsman

Revision 95906 - (view) (annotate) - [select for diffs]
Modified Fri Jun 28 08:40:25 2002 UTC (7 years, 4 months ago) by jerenkrantz
File length: 27139 byte(s)
Diff to previous 95676 (colored)
Add a filter_init function to the filters so that a filter can execute
arbitrary code before the handlers are invoked.

This resolves an issue with incorrect 304s on If-Modified-Since mod_include
requests since ap_meets_conditions() is not aware that this is a dynamic
request and it is not possible to satisfy 304 for these requests (unless
xbithack full is on, of course).  When mod_include runs as a filter, it is
too late to set any flag since the handler is responsible for calling
ap_meets_conditions(), which it should do before generating any data.

If a module doesn't need to run such arbitrary code, it can just pass NULL
as the argument and all is well.

PR:	9673
Reviewed by:	Ryan Bloom and others

Revision 95676 - (view) (annotate) - [select for diffs]
Modified Fri Jun 14 17:16:59 2002 UTC (7 years, 5 months ago) by wrowe
File length: 27127 byte(s)
Diff to previous 95666 (colored)
  Clean up a signedness emit

Revision 95666 - (view) (annotate) - [select for diffs]
Modified Fri Jun 14 07:58:34 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 27105 byte(s)
Diff to previous 95615 (colored)
Modify the deflate input filter so that it should always return data on a
blocking read.

Revision 95615 - (view) (annotate) - [select for diffs]
Modified Wed Jun 12 07:40:54 2002 UTC (7 years, 5 months ago) by wrowe
File length: 26347 byte(s)
Diff to previous 95548 (colored)
  An important observations before some x86'er attacks this idea.

Revision 95548 - (view) (annotate) - [select for diffs]
Modified Thu Jun 6 15:25:21 2002 UTC (7 years, 5 months ago) by trawick
File length: 26314 byte(s)
Diff to previous 95521 (colored)
get the prototype for strcasecmp() on AIX

Revision 95521 - (view) (annotate) - [select for diffs]
Modified Wed Jun 5 09:08:02 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 26267 byte(s)
Diff to previous 95413 (colored)
Oops.

When deflating: only reset ctx->stream buffers when the ctx was NULL.
When inflating: remember to clear the ctx->bb after we're done with it.

Revision 95413 - (view) (annotate) - [select for diffs]
Modified Thu May 30 22:06:01 2002 UTC (7 years, 5 months ago) by jwoolley
File length: 26269 byte(s)
Diff to previous 95399 (colored)
Why the stack buffer and the copy?  This seems much more straightforward.

Revision 95399 - (view) (annotate) - [select for diffs]
Modified Thu May 30 11:00:42 2002 UTC (7 years, 5 months ago) by trawick
File length: 26566 byte(s)
Diff to previous 95397 (colored)
keep the signed-ness of char buffers consistent with what is expected
by functions they are passed to (putLong() this time)

Revision 95397 - (view) (annotate) - [select for diffs]
Modified Thu May 30 08:32:09 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 26557 byte(s)
Diff to previous 95359 (colored)
Unroll the putLong and getLong loops and correct putLong's input param type to
be unsigned char* instead of char*.

Submitted by:	Sander Striker
Reviewed by:	Justin Erenkrantz

Revision 95359 - (view) (annotate) - [select for diffs]
Modified Wed May 29 17:55:42 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 26453 byte(s)
Diff to previous 95350 (colored)
Make sure that z_RC is not Z_STREAM_END in case we get a 0-length bucket
and we don't enter the while loop.

Submitted by:	Jeff Trawick's horde of picky compilers

Revision 95350 - (view) (annotate) - [select for diffs]
Modified Wed May 29 14:26:00 2002 UTC (7 years, 5 months ago) by trawick
File length: 26428 byte(s)
Diff to previous 95345 (colored)
get mod_deflate to compile with compilers that care about the
signed-ness of char *

it looks like it should work fine, but it is untested

Revision 95345 - (view) (annotate) - [select for diffs]
Modified Wed May 29 10:27:05 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 26449 byte(s)
Diff to previous 95343 (colored)
Input filter support for mod_deflate.

Highly experimental, but known to work for some tests.

Revision 95343 - (view) (annotate) - [select for diffs]
Modified Wed May 29 07:23:10 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 17931 byte(s)
Diff to previous 95341 (colored)
Add a note indicating what it would take to get MTIME field populated.
(I did this locally, but didn't figure it was worth committing, but it's
still worth noting.)

Revision 95341 - (view) (annotate) - [select for diffs]
Modified Wed May 29 06:40:23 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 17403 byte(s)
Diff to previous 95339 (colored)
Implement flushing support for mod_deflate.
(Review of RFC 1952 indicates that this is indeed easily allowable.)

Revision 95339 - (view) (annotate) - [select for diffs]
Modified Wed May 29 05:48:57 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 16993 byte(s)
Diff to previous 95181 (colored)
Allow mod_deflate to be more tolerant of multiple content-encodings.

- Tighten scope of a few affected variables (accepts, token).
- Look for gzip in r->headers_out (!) - if there, we've already compressed.
  (Previously, we'd look at r->headers_in which was bogus - we're output.)
- Switch the Accept-Encoding check to be case-insensitive per RFC 2616.
- Remove commented-out code.
- If C-E wasn't present or it was just "identity," set C-E to "gzip",
  otherwise, merge "gzip" onto the C-E list.

This patch was originally submitted by Ian and cleaned up and tested by
Justin.

Submitted by:	Ian Holsman
Reviewed by:	Justin Erenkrantz

Revision 95181 - (view) (annotate) - [select for diffs]
Modified Mon May 20 00:07:33 2002 UTC (7 years, 6 months ago) by ianh
File length: 16428 byte(s)
Diff to previous 95151 (colored)
content with "Content-Encoding" header, content is encoded.
But mod_deflate does not check it. It cause to encode content twice.

This problem is reproducable by getting encoded content via mod_proxy.

Patch Contributed by kaz@asada.sytes.net (ASADA Kazuhisa)
Bug #9222

Thanks Kazuhisa

Revision 95151 - (view) (annotate) - [select for diffs]
Modified Fri May 17 11:33:10 2002 UTC (7 years, 6 months ago) by trawick
File length: 16194 byte(s)
Diff to previous 95055 (colored)
stop using APLOG_NOERRNO in calls to ap_log_[pr]error()

Revision 95055 - (view) (annotate) - [select for diffs]
Modified Mon May 13 07:11:01 2002 UTC (7 years, 6 months ago) by jerenkrantz
File length: 16226 byte(s)
Diff to previous 94987 (colored)
Fix mod_deflate corruption when using multiple input buckets.  We should
only clear *_out when we are the beginning or avail_out == 0.

Justin was tracking this down before he went to WWDC and didn't finish
before he left.  A (virtual) beer goes to Asada who filed this PR with
the right patch!

PR: 9014
Submitted by:	kaz@asada.sytes.net (ASADA Kazuhisa)
Reviewed by:	Justin Erenkrantz

Revision 94987 - (view) (annotate) - [select for diffs]
Modified Tue May 7 00:35:16 2002 UTC (7 years, 6 months ago) by jerenkrantz
File length: 16186 byte(s)
Diff to previous 94982 (colored)
Add DeflateBufferSize directive to replace hardcoded FILTER_BUFSIZE
definition.  Also speeds up ctx init since it takes the buffer and does
a malloc rather than a calloc on it.

Revision 94982 - (view) (annotate) - [select for diffs]
Modified Mon May 6 23:37:15 2002 UTC (7 years, 6 months ago) by jerenkrantz
File length: 15525 byte(s)
Diff to previous 94979 (colored)
If we determine that we shouldn't be involved in this request, remove
ourselves from the filter chain (so we don't duplicate this path
each time a brigade comes through).

Revision 94979 - (view) (annotate) - [select for diffs]
Added Mon May 6 22:23:52 2002 UTC (7 years, 6 months ago) by jerenkrantz
File length: 15325 byte(s)
Move mod_deflate from experimental to filters to represent our belief
in its stability.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2