还是前天的那个 encoding的问题。今天坐车的时候我突然想到,HttpWebResponse的对象应该有保存了Encoding相关的信息,回来一查 HttpWebResponse 对象的 ContentEncoding Property似乎与此有关,msdn上这样说:
Gets the method used to encode the body of the response.
public string ContentEncoding {get;}
Property Value
A string describing the method used to encode the body of the response.
Remarks
The ContentEncoding property contains the value of the Content-Encoding header returned with the response.
然而,我试了几个网站,这个属性都返回空字符串,这是怎么回事呀?