Sitemesh + GZip filter
Guillaume Boudreau <[email protected]> Wed, 10 Aug 2005 14:00:46 CDT
| Newsgroups | gmane.comp.web.sitemesh.general,gmane.comp.lang.pnuts.user |
|---|---|
| Message-ID | <21760737.1123700514821.JavaMail.os-j2ee@opensymphony01.contegix.com> |
I'm currently doing tests using a little php tool that can fetch a webpage and gunzip it and show the result etc (http://scripts.incutio.com/httpclient/HttpClient.class.php).
- Sitemesh & GZip enabled, no decorator applied.
This page is decoded correctly. It seems to send the answer twice for some reason, but the data is correctly handled anyway:
HTTP/1.1 200 OK
Date: Wed, 10 Aug 2005 18:33:33 GMT
Server: Orion/2.0.5
Content-Length: 1933
Connection: Close
Content-Type: text/html
Content-Encoding: gzip
...........UMo.0...Wp.....i.} q|.v.:`.z...-.V*K.%7...d.Y.%@..;X..E>>.QQ..V.Q. ..s.),.M-u...(.......lE.s......;...-..2..&I"a..E..
I.'q.x..JC.i.f.*T..BH]......|#.k....3V...'....1..9..fo...$\.Z.....X....F..k.......]......[.
..M.<.f..dN.....l.+.j.*Sq'.N...,!..L.6]..^DI.X...#mv...%
.....m
......F...Z9...%.d.k...RZ...'TH.)..C.3.a.....d..w../.p...b ".;..W75.^.d.4...I|....z......O....M.a.+..F.F...&..7dO...C..^.j.. .g....P;R....c......a.......Cw..g.]....O..... ?.*..K9.m..r
JP..9....v@._..M..K.,...{...K.|.{..L..Q..]Y..Ah........Us.k.1|..)
'.F. . .TM.p........p.H...C[.......:.#..........s.}...#.W@>r7.h?......e.......p....HTTP/1.1 200 OK
Date: Wed, 10 Aug 2005 18:33:33 GMT
Server: Orion/2.0.5
Content-Length: 1933
Connection: Close
Content-Type: text/html
Content-Encoding: gzip
...........UMo.0...Wp.....i.} q|.v.:`.z...-.V*K.%7...d.Y.%@..;X..E>>.QQ..V.Q. ..s.),.M-u...(.......lE.s......;...-..2..&I"a..E..
I.'q.x..JC.i.f.*T..BH]......|#.k....3V...'....1..9..fo...$\.Z.....X....F..k.......]......[.
..M.<.f..dN.....l.+.j.*Sq'.N...,!..L.6]..^DI.X...#mv...%
.....m
......F...Z9...%.d.k...RZ...'TH.)..C.3.a.....d..w../.p...b ".;..W75.^.d.4...I|....z......O....M.a.+..F.F...&..7dO...C..^.j.. .g....P;R....c......a.......Cw..g.]....O..... ?.*..K9.m..r
JP..9....v@._..M..K.,...{...K.|.{..L..Q..]Y..Ah........Us.k.1|..)
'.F. . .TM.p........p.H...C[.......:.#..........s.}...#.W@>r7.h?......e.......p....
- Sitemesh & GZip enabled, decorator applied.
I applied a decorator that doesn't change the resulting page (ie decorated page == non-decorated page). I verified this by disabled the gzip filter, and checked that with sitemesh enabled and disabled, i get the same page.
Since the resulting page is the same as for the previous test, I would expect the same answer. But it differs.
HTTP/1.1 200 OK
Date: Wed, 10 Aug 2005 18:42:54 GMT
Server: Orion/2.0.5
Content-Length: 641
Set-Cookie: JSESSIONID=MIMJEIKBPPHN; Path=/; secure
Cache-Control: private
Connection: Close
Content-Type: text/html
Content-Encoding: gzip
...........j..............UMo.0...Wp.....i.} q|.v.:`.z...-.V*K.%7...d.Y.%@..;X..E>>.QQ..V.Q. ..s.),.M-u...(.......lE.s......;...-..2..&I"a..E..
I.'q.x..JC.i.f.*T..BH]......|#.k....3V...'....1..9..fo...$\.Z.....X....F..k.......]......[.
..M.<.f..dN.....l.+.j.*Sq'.N...,!..L.6]..^DI.X...#mv...%
.....m
......F...Z9...%.d.k...RZ...'TH.)..C.3.a.....d..w../.p...b ".;..W75.^.d.4...I|....z......O....M.a.+..F.F...&..7dO...C..^.j.. .g....P;R....c......a.......Cw..g.]....O..... ?.*..K9.m..r
JP..9....v@._..M..K.,...{...K.|.{..L..Q..]Y..Ah........Us.k.1|..)
'.F. . .TM.p........p.H...C[.......:.#..........s.}...#.W@>r7.h?......e....Y..o.....]_&j...
The zipped data is 'almost' the same in both test. In the second test, there's 15 bytes at the start that aren't there in the 1st test (the 15 bytes that follows the 10 bytes header of gzipped data). And the last 20 bytes of the 2nd test zipeed data also differs fro the last 11 bytes of the 1st test gzipped data.
The funny thing is: this data (from the 2nd test) is valid gzipped data. It can be extracted without error, and results in more gzipped data that can also be extracted into something close to a valid HTML page!
I think I'm close to finding the cause of all this... Twice zipped data and twice the same HTTP answer... I'd guess that's no coincidence.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=5287&messageID=12617#12617
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]