1 Apr 2005 12:31
RE: Compression Filter Problem
<nick.wadge <at> uk.nomura.com>
2005-04-01 10:31:58 GMT
2005-04-01 10:31:58 GMT
The
off-the-shelf filter I used was this:
It
would be interesting to see if anyone else gets the same problem with pdf and
jsp files.
Cheers
Nick
-----Original Message-----
From: jetty-support-admin <at> lists.sourceforge.net [mailto:jetty-support-admin <at> lists.sourceforge.net]On Behalf Of Wadge, Nick
Sent: 01 April 2005 10:50
To: jetty-support <at> lists.sourceforge.net
Subject: RE: [Jetty-support] Compression Filter Problem
Thanks for the responses!These are the headers for the jsp requestHTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:33:35 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Set-Cookie: JSESSIONID=508tf9876kob5;path=/testand these for the pdfHTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:44:13 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/pdf
Last-Modified: Wed, 01 Dec 2004 14:58:12 GMT
Accept-Ranges: bytesIt may well be a header issue, but as I said, I get the same problem with an off the shelf compression filter, which wouldn't particularly indicate a bug in my own filter.I'm not setting the Content-Disposition header because I don't want the open/save dialog to appear; I want the pdf to open in the browser (MSIE 6.0 SP1) as it does when the content is not compressed.Thanks againNick-----Original Message-----
From: jetty-support-admin <at> lists.sourceforge.net [mailto:jetty-support-admin <at> lists.sourceforge.net]On Behalf Of Chris Haynes
Sent: 01 April 2005 10:32
To: jetty-support <at> lists.sourceforge.net
Subject: Re: [Jetty-support] Compression Filter Problem
Er, actually, on second thoughts I now think compression _should_ work with PDF. Sorry.Your problems are almost certainly to do with headers.You should be including a Content-Encoding header, such asContent-Encoding: gziporContent-Encoding: compressIf you are still having trouble, post the headers here so we can look at them, and tell us which compression algorithm you are using.Chris Haynes----- Original Message -----From: Chris HaynesSent: Friday, April 01, 2005 10:15 AMSubject: Re: [Jetty-support] Compression Filter ProblemDon't even try to compress PDF downloads. The MSIE/ADOBE combination relies on multiple, direct byte-indexed access to the 'file'. See several archived posts concerning PDF and MSIE.As for .jsp, well, its up to the JSP class what kind of response it generates. Normally it is HTML and so, with the matching content-related headers in the response, I don't know why it should not work. Check what headers are being generated. But are your responses from JSP queries really that large that you need compression?Chris Haynes----- Original Message -----Sent: Friday, April 01, 2005 9:21 AMSubject: [Jetty-support] Compression Filter ProblemHi allI'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to compress the response for certain Mime Types. All seems to work well for .html files, but I run into problems with .pdf and .jsp files.With .pdf files, I get the save/open file dialog, rather than having the pdf open in the browser. Regardless of whether I select open or save, I then get a message that IE is not able to access the site.With JSPs, I just get a blank page.I thought this may be a problem with my filter, but having downloaded a free one from the web, I get the same problems.Spoofing the request, seems to return the correct headers and the correct content length.I've also tried this with Jetty 5 and get the same thing.Does anyone have any idea why this may be happening or can suggest some free software that they know works.Many thanksNickSet yourself a tennis challenge!Enter this year's Nomura Inter-Company Tennis ChallengeEntries close 15 April 2005www.nomura-tennis.co.ukPLEASE READ: The information contained in this email is confidentialand intended for the named recipient(s) only. If you are not an intendedrecipient of this email you must not copy, distribute or take anyfurther action in reliance on it and you should delete it and notify thesender immediately. Email is not a secure method of communication andNomura International plc cannot accept responsibility for the accuracyor completeness of this message or any attachment(s). Please examine thisemail for virus infection, for which Nomura International plc acceptsno responsibility. If verification of this email is sought then pleaserequest a hard copy. Unless otherwise stated any views or opinionspresented are solely those of the author and do not represent those ofNomura International plc. This email is intended for informationalpurposes only and is not a solicitation or offer to buy or sellsecurities or related financial instruments. Nomura International plc isregulated by the Financial Services Authority and is a member of theLondon Stock Exchange.
Set yourself a tennis challenge!
Enter this year's Nomura Inter-Company Tennis Challenge
Entries close 15 April 2005
www.nomura-tennis.co.uk
PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.
RSS Feed