On 10 February 2011 23:51, Night Mare <[email protected]> wrote:
> Hi there,
> I have captured some http packets using wireshark. And I want to save
> content of these packets like index.html
> I can read packets and convert them to the string but  i can not decode them
> (chunk, gzip vs. problems)
> For example i have a sample string like below(Note: string contains \r\n
> characters but i can not show them in mail) :
>
>
> --------------------------------------------------------
> HTTP/1.1 200 OK
> Pragma: no-cache
> Cache-Control: private, max-age=0, no-cache
> Expires: Mon, 26 Jul 1997 05:00:00 GMT
> P3P: CP="CUR ADM OUR NOR STA NID"
> Set-Cookie: OAID=e1911d5cd304171a10af30e33c8a6126; expires=Fri, 10-Feb-2012
> 22:39:47 GMT; path=/
> Content-type: text/html; charset=UTF-8
> Content-Encoding: gzip
> Vary: Accept-Encoding
> Connection: close
> Transfer-Encoding: chunked
> Date: Thu, 10 Feb 2011 22:39:47 GMT
> Server: what server
>
> 292
> ..........|S.n.0.}_i..].X.H.do........Z.<UN.&n.;r.........NBY$...x.>sf.89.z...r{
> *]sp.....K...>./...\...7oo..z`..h.fR`...;.`.u.!........D...`.|{x4.}t.%..l....5.m...?...4..".E.B*
> x.,....4..f.dG.f-...........@w
> M......5gsI:....d".bPQVV:.=.4.9..K%..8..RE}.
> V.9.{Ft5.......Qa.T..'..s..h$h.Y*.b....z..x...,KN.g:).,9......
> ....m.xa....b...W......:..:..9.|.....-.1...B7.....c.....|./..b5......
> ../.....B..Mm.=wk.....UE:......%p.........-d=FQ[........8UB..0....B.;...`.^.9.}.S..Ak..yk..i.8........lFk.Z.3.t....BE....%.t....{.jW.G.kJ:li.ZY."B93.../..j^.X....`...M\..6...e..*.5+....,R........f=._....coD.s..6.q..yz\v?..zp.qobn.O-.$;T=*[email protected]..*E..e._.......9.......
> 0
>
> ---------------------------------------------------------------------------
>
>
>
> is there any way to decode this as html page. if it is possible please some
> code or  similar code.

http://hc.apache.org/httpcomponents-client-ga/examples.html

which is the first link I found by googling for "httpclient content gzip"

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to