00000000 78 da 75 8e cb 6e c2 30 10 45 ff 65 d6 59 d8 f1 x u n 0 E e Y
00000010 0b 67 17 42 f8 0d 8b da 03 b5 08 e3 28 26 08 54 g B (& T
00000020 f5 df 6b b7 c0 ae b3 bb a3 a3 73 ef 17 cc 57 37 k s W7
00000030 47 0f 1d ad d3 d4 c0 27 41 67 95 61 ba dd 34 70 G 'Ag a 4p
00000040 27 97 e3 c9 65 cc 39 26 72 67 7c bc 31 e8 00 91 ' e 9&rg| 1
00000050 0b e6 03 e3 e8 ad e5 1f 1b 69 6c 38 22 1e a4 6f il8" o
00000060 45 40 a5 a1 81 34 23 c5 50 58 f6 df 71 b1 33 86 E@ 4# PX q 3
00000070 c9 c2 4e e9 14 c9 f9 14 f0 55 52 96 ad 19 97 2a N UR *
00000080 f8 7b 54 dd ef 08 b0 c3 d8 f2 9d d2 7d af 7a 36 {T } z6
00000090 5a 23 8d d6 7b 35 0a 21 f7 db b1 1d 54 f1 dd 70 Z# {5 ! T p
000000a0 a9 ab 0b cc 79 cd 4f 1b 1d 2e ef 82 05 af eb 42 y O . B
000000b0 91 8e a9 52 f0 fd 03 2e 1f 4f ca R . O
Content-Type | text/html; charset=UTF-8 |
Date | Sat, 04 Feb 2012 12:12:19 GMT |
Proxy-Connection | Keep-alive |
Server | nginx/0.7.67 |
Transfer-Encoding | chunked |
X-Powered-By | PHP/5.2.14 |
Accept | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
Accept-Encoding | gzip, deflate |
Accept-Language | zh-cn,zh;q=0.5 |
Cookie | pgv_pvid=1087571583 |
Host | app25270.qzoneapp.com |
Proxy-Connection | keep-alive |
User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20100101 Firefox/10.0 |
Content-length | 182 |
Content-type | application/octet-stream |
响应显示信息是text/html格式,也就是普通的文本内容,但看到的不是明文,所以应该是根据下面的accept-encoding压缩过,应该是gzip,解一下试试
请问一下,是将16进制字符串取出来解压呢?还是把右边的乱码取出来解压呢?
能告诉我下解压的过程吗?
解压代码我有,参数是字符串类型的,不知道对不对?
public static string UnZip(string value) { //Transform string into byte[] byte[] byteArray = new byte[value.Length]; int indexBA = 0; foreach (char item in value.ToCharArray()) { byteArray[indexBA++] = (byte)item; }
//Prepare for decompress System.IO.MemoryStream ms = new System.IO.MemoryStream(byteArray); System.IO.Compression.GZipStream sr = new System.IO.Compression.GZipStream(ms, System.IO.Compression.CompressionMode.Decompress);
//Reset variable to collect uncompressed result byteArray = new byte[byteArray.Length];
//Decompress int rByte = sr.Read(byteArray, 0, byteArray.Length);
//Transform byte[] unzip data to string System.Text.StringBuilder sB = new System.Text.StringBuilder(rByte); //Read the number of bytes GZipStream red and do not a for each bytes in //resultByteArray; for (int i = 0; i < rByte; i++) { sB.Append((char)byteArray[i]); } sr.Close(); ms.Close(); sr.Dispose(); ms.Dispose(); return sB.ToString(); }
@夜猫子罗: 奇怪了,你是用什么获取到的这些数据?理论上,所有的HTTP客户端都应该会自动解码的
@丁学:
系统自动解出来的是乱码,所以我才手动解码的。
xÚuÁnà DÿeÏ>�fÁÎ2'¨.FÁUý÷B¢äÖ=F³ofÀNÙ'*9o`ÝÎ!ysNÀÈ@Õ=4°%?ý½ý02ªQ(
½ªQ#R¥]1
ßü5-*Åò~$7íIH»9²¿ÖÐx¬ë[ÓIrÛ*²¾£Éál²Ïj-¶ýjM{ÕØKÙ9·-EçdßIlØvÌevKÖ[xä¥0¿õ±ÚÈC
[-%áðûWö
不知道怎么搞的。