[MKDoc-dev] Using Apache::Dynagzip rather than mod_gzip

Slava Bizyayev sbizyaye at outlook.net
Mon Apr 18 18:05:00 BST 2005


>From my point of view it looks mainly like an incompatibility of the
site code with the Apache::Filter requirements. See Apache::Filter docs
for the right way to send out HTTP headers.

On Mon, 2005-04-18 at 11:30, Chris Croome wrote:
> Hi
> 
> OK, I have this more-or-less working, in the httpd-mkdoc.conf file I
> Added this:
> 
>   PerlModule Apache::Filter
>   PerlModule Apache::Dynagzip
>   PerlModule Apache::CompressClientFixup
>   PerlSetVar Filter On
>   PerlSetVar LightCompression On
>   PerlHandler Apache::RegistryFilter Apache::Dynagzip
>   PerlFixupHandler Apache::CompressClientFixup
> 
> And I commented out this:
> 
>   #  PerlHandler Apache::Registry
> 
> And now content is compressed using Dynagzip, however an extra
> Content-Type header is added to the start of the content:
> 
>   Content-Type: text/html; charset=UTF-8
> 
> However if line number 77 in flo/plugin/Cache/Reader.pm is commented
> out then everything is fine:
> 
>   #    $header->set ('Content-Type: text/html; charset=UTF-8');

This should be uncommented. You need to change the procedure of sending
headers indeed.

> 
> This fixes everything in the public interface for documents served
> with 200's however 404's are broken, they have headers like this:
> 
>   HTTP/1.1 200 OK
>   Date: Mon, 18 Apr 2005 16:23:16 GMT
>   Server: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_perl/1.29
>   X-Module-Sender: Apache::Dynagzip
>   Expires: Monday, 18-April-2005 16:28:19 GMT
>   Vary: Accept-Encoding
>   Content-Type: text/html; charset=UTF-8
>   Content-Encoding: gzip
>   Connection: close
> 
> Followed by this content:
> 
>   Status: 404 Not Found
>   Content-Type: text/html; charset=UTF-8
> 
> Also there are more problems in the editor interface, pages have
> the extra Content-Type header and Redirects (generated after adding
> content and operations like that) have headers in the content of the
> page, rather than in the header:
> 
>   Status: 302 Moved 
>   Location: http://users.example.org/css/
> 
> I expect this is all because there is some rather odd code in MKDoc
> that isn't doing HTTP headers in anything like the correct way...

Actually, the requirements of CGI, Apache::Registry, and Apache::Filter
are NOT the same. It is possible to support all of them though...

> 
> In addition if you have a server doing multiple site and one is set
> up to use Apache::RegistryFilter then it appears to cause the other
> sites to generate internal server errors like this:
> 
>   [Mon Apr 18 17:17:23 2005] [error] Undefined subroutine &Apache::Registry::handler called.\n

This looks like a complain about the fact that some code is trying to
use Apache::Registry when the latest was already removed from the
configuration...

> 
> I'll add this as a bug to the mkdoc.org web site...
> 
> Chris

Slava




More information about the MKDoc-dev mailing list