You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Richard Chen <ri...@doubleprime.com> on 2004/04/02 03:46:25 UTC

Spurious characters due to Apache::Filter and Apache::Compress

Hi,

	We have seen a very disturbing problem when
Apache::Filter and Apache::Compress are used for
output compression. Most of the time, everything is fine.
But occasionally we find that spurious binary characters
are introduced in the output. For example, a source line like this:

This is an En dash <literal binary character &#150;> ok

will be turned into this output line:

This is an En dash <literal binary character &#194;><literal binary character &#150;> ok

Here by <literal binary character &#150;> I mean the single ISO-8859-1
character en-dash. Similarly for &#194.

	What is interesting is that after modperl server
restart, everything is fine for a while. It is only after the server
has served a lot of requests that some of the child processes
starts to introduce the spurious character. The only spurious
character I have seen is this &#194 right before other binary nonprintable
ISO-8859-1 characters. It seems that there is some incomplete
cleaning up after requests so that certain state info got changed
in those modules which caused this problem. The problem is that
I don't have a specific url to use to debug this.

	Once this compression is disabled, everything is fine
no matter how long the server is up. So definitely the problem
is caused by these modules.

	This happened on both solaris 8 and solaris 9 running
perl 5.8.0. We are using Apache-Compress-1.003 and Apache-Filter-1.022.
We use them like this:

        <Files ~ ".*\.tmpl">
                SetHandler perl-script
                PerlSetVar Filter On
                PerlHandler My::Template Apache::Compress
        </Files>

Has anyone seen this problem before? Is there a fix
for this? Have these modules been used in production servers
for different languages?

Thanks for any info.

Richard

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html