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

Chris Croome chris at webarchitects.co.uk
Mon Apr 18 17:30:26 BST 2005


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 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...

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

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

Chris

-- 
Chris Croome                               <chris at webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   


More information about the MKDoc-dev mailing list