I've been trying to use Apache::GzipChain on my web server. Here is the configuration options I'm using httpd.conf:
<Directory "/path/to/dir"> AddHandler perl-script .cgi PerlHandler Apache::OutputChain Apache::GzipChain Apache::Registry allow from all PerlSendHeader On # Other stuff </Directory>
When I tried to access the front page with IE, the browser simply stoped. No error message, just stoped. So I tried connecting to the server via telnet like this:
$ telnet www.example.com 80 Trying 0.0.0.0... Connected to www.example.com. Escape character is '^]'. GET / HTTP/1.1 Host: example.com
And the response:
HTTP/1.1 200 OK Date: Fri, 13 Jun 2003 03:41:25 GMT Server: Apache/1.3.27 (Unix) Transfer-Encoding: chunked Content-Type: text/html fa1 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -- Rest of response unimportant --
My pages are generated from HTML::Template files, and they do have a valid DOCTYPE at the top, on the first line, with the second line starting the PUBLIC section. As you can see above, the first line is being cut off. I tried adding a blank line at the top in the template, but the behavior with IE remained (though a new telnet connect confirmed that the full DOCTYPE was being sent). Taking out the Apache::GzipChain in the chain caused it to work properly again.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
In reply to Apache::GzipChain not sending first line of data by hardburn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |