You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2003/08/08 20:13:32 UTC
DO NOT REPLY [Bug 22259] New: -
deflate generates error when called with no data
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22259
deflate generates error when called with no data
Summary: deflate generates error when called with no data
Product: Apache httpd-2.0
Version: 2.0.47
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: mod_deflate
AssignedTo: bugs@httpd.apache.org
ReportedBy: bill@kenyonhill.com
CC: stas@stason.org
This bug was orignally reported against mod_perl, but was traced down to a
problem in mod_deflate.
If a print "" is done from a mod_perl script which mod_deflate active, the page
output terminates and and error like this produced:
[error] 673: ModPerl::RegistryBB: 20014:Error string not specified yet
at /var/www/perl/test.pl line 6.
Here is a patch (coded by Stas Bekman stas@stason.org)
Index: modules/filters/mod_deflate.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
retrieving revision 1.26.2.5
diff -u -r1.26.2.5 mod_deflate.c
--- modules/filters/mod_deflate.c 17 May 2003 18:27:43 -0000 1.26.2.5
+++ modules/filters/mod_deflate.c 5 Aug 2003 06:37:59 -0000
@@ -529,9 +529,11 @@
if (APR_BUCKET_IS_FLUSH(e)) {
apr_bucket *bkt;
- zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
- if (zRC != Z_OK) {
- return APR_EGENERAL;
+ if (ctx->stream.avail_in > 0) {
+ zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
+ if (zRC != Z_OK) {
+ return APR_EGENERAL;
+ }
}
ctx->stream.next_out = ctx->buffer
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org