[Mod_gzip] Application/pdf and mod_gzip

mod_gzip@lists.over.net mod_gzip@lists.over.net
Sun, 22 Feb 2004 02:27:04 EST


--part1_125.2b1594f4.2d69b3c8_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit


Hello Marc...
This is Kevin Kiley

Question for ya...

Are you 'excluding' the PDF compressions in PHASE 1
of the mod_gzip decision making process ( right at the
front door when request is made ) or during PHASE 2
of the mod_gzip decision making process ( after the 
response has started to arrive from the Server ).

It could make a difference here.

Is your mod_gzip config set to exclude PDF files 
from compression with something like this...

mod_gzip_item_exclude file *.pdf

or, perhaps...

mod_gzip_item_exclude mime "application/pdf"
or maybe
mod_gzip_item_exclude rspheader "Content-type: application/pdf".

The first example above would force mod_gzip to 'back off'
the moment the file is 'requested' and before it's even located
on the Server.

The other 2 would cause mod_gzip to believe the response
MIGHT need to be compressed and it would start the
whole process and wait for the response header to show
up with "Content-type: application/pdf" before 'backing off'
and abandoning the compression.

I recommend the first approach.

If you know you don't want to compress .pdf files then
the best thing to do is block them on the REQUEST 
side. That way... mod_gzip never even really 'kicks in'
and there's no possible way it could have anything to
do with the response that comes from the Server.

If you are ALREADY excluding the PDF's via the first
method then I would have a hard time believing that mod_gzip
could possibly have ANYTHING to do with whatever is
bothering AcroRead. When mod_gzip already knows that
it should not bother compressing something by an 
exclusion hit in the REQUEST itself... then mod_gzip
module actually returns DECLINED from it's startup
routine and is in no way involved with the request or
the response from that point on. It never even gets
'called' by Apache again after that.

Later...
Kevin




In a message dated 1/27/2004 3:38:35 AM Central Standard Time, 
marc.reynes@free.fr writes:


> 
> 
> Hello the list,
> 
> I have some problems using mod_gzip with application/pdf content.
> I excluded this mime type from the compression in my config (and it's indeed
> excluded if I trust the log). Neverthless when opening a page which has
> application/pdf as Content-type, IE fires acroread and that's all. The pdf 
> file
> doesn't load.
> 
> This situation is kind of wierd and looks like an acroead problem as I have 
> no
> problem with mozilla/gpdf under linux.
> 
> Note : as the pdf isn't compressed, it's not the same problem than the one
> explained here : 
> http://www.schroepl.net/projekte/mod_gzip/browser.htm.htm#Acrobat
> 
> Does someone know a workaround to this problem ? I don't find any reference
> about that (or only poors one).
> 
> I tried to remove the "Vary:Accept-Encoding" header by adding the header
> "Pragma: no-cache", but it doesn't apparently work.  May my problems a
> consequence of the "vary" header, and if yes, how can i remove it ?
> 
> Any help is welcome
> 
> Thanks
> MR.
> _______________________________________________
> mod_gzip mailing list
> mod_gzip@lists.over.net
> http://lists.over.net/mailman/listinfo/mod_gzip
> 


--part1_125.2b1594f4.2d69b3c8_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<HTML><FONT FACE=3Darial,helvetica><HTML><FONT  SIZE=3D2 PTSIZE=3D10><BR>
Hello Marc...<BR>
This is Kevin Kiley<BR>
<BR>
Question for ya...<BR>
<BR>
Are you 'excluding' the PDF compressions in PHASE 1<BR>
of the mod_gzip decision making process ( right at the<BR>
front door when request is made ) or during PHASE 2<BR>
of the mod_gzip decision making process ( after the <BR>
response has started to arrive from the Server ).<BR>
<BR>
It could make a difference here.<BR>
<BR>
Is your mod_gzip config set to exclude PDF files <BR>
from compression with something like this...<BR>
<BR>
mod_gzip_item_exclude file *.pdf<BR>
<BR>
or, perhaps...<BR>
<BR>
mod_gzip_item_exclude mime "application/pdf"<BR>
or maybe<BR>
mod_gzip_item_exclude rspheader "Content-type: application/pdf".<BR>
<BR>
The first example above would force mod_gzip to 'back off'<BR>
the moment the file is 'requested' and before it's even located<BR>
on the Server.<BR>
<BR>
The other 2 would cause mod_gzip to believe the response<BR>
MIGHT need to be compressed and it would start the<BR>
whole process and wait for the response header to show<BR>
up with "Content-type: application/pdf" before 'backing off'<BR>
and abandoning the compression.<BR>
<BR>
I recommend the first approach.<BR>
<BR>
If you know you don't want to compress .pdf files then<BR>
the best thing to do is block them on the REQUEST <BR>
side. That way... mod_gzip never even really 'kicks in'<BR>
and there's no possible way it could have anything to<BR>
do with the response that comes from the Server.<BR>
<BR>
If you are ALREADY excluding the PDF's via the first<BR>
method then I would have a hard time believing that mod_gzip<BR>
could possibly have ANYTHING to do with whatever is<BR>
bothering AcroRead. When mod_gzip already knows that<BR>
it should not bother compressing something by an <BR>
exclusion hit in the REQUEST itself... then mod_gzip<BR>
module actually returns DECLINED from it's startup<BR>
routine and is in no way involved with the request or<BR>
the response from that point on. It never even gets<BR>
'called' by Apache again after that.<BR>
<BR>
Later...<BR>
Kevin<BR>
<BR>
<BR>
<BR>
<BR>
In a message dated 1/27/2004 3:38:35 AM Central Standard Time, marc.reynes@f=
ree.fr writes:<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px"><BR>
<BR>
Hello the list,<BR>
<BR>
I have some problems using mod_gzip with application/pdf content.<BR>
I excluded this mime type from the compression in my config (and it's indeed=
<BR>
excluded if I trust the log). Neverthless when opening a page which has<BR>
application/pdf as Content-type, IE fires acroread and that's all. The pdf f=
ile<BR>
doesn't load.<BR>
<BR>
This situation is kind of wierd and looks like an acroead problem as I have=20=
no<BR>
problem with mozilla/gpdf under linux.<BR>
<BR>
Note : as the pdf isn't compressed, it's not the same problem than the one<B=
R>
explained here : http://www.schroepl.net/projekte/mod_gzip/browser.htm.htm#A=
crobat<BR>
<BR>
Does someone know a workaround to this problem ? I don't find any reference<=
BR>
about that (or only poors one).<BR>
<BR>
I tried to remove the "Vary:Accept-Encoding" header by adding the header<BR>
"Pragma: no-cache", but it doesn't apparently work.&nbsp; May my problems a<=
BR>
consequence of the "vary" header, and if yes, how can i remove it ?<BR>
<BR>
Any help is welcome<BR>
<BR>
Thanks<BR>
MR.<BR>
_______________________________________________<BR>
mod_gzip mailing list<BR>
mod_gzip@lists.over.net<BR>
http://lists.over.net/mailman/listinfo/mod_gzip<BR>
</BLOCKQUOTE><BR>
<BR>
</FONT></HTML>
--part1_125.2b1594f4.2d69b3c8_boundary--