首页 新闻 会员 周边

HTTPConnection getresponse数据不正确 python

0
悬赏园豆:5 [已关闭问题] 关闭于 2013-06-13 13:20

conn = httplib.HTTPConnection(_urld.netloc,80,True,3)   

conn.connect()   

conn.putrequest("POST", url)
conn.putheader("Content-Length", str(len(data)))
conn.putheader("Content-Type", "application/x-www-form-urlencoded")

conn.putheader("Connection", "close")
conn.endheaders()

f = conn.getresponse()
self.httpBody = f.read()

---------------------------------

打印出来的self.httpBody

其中的一段数据为:

<form href="http://CXXXXXXXX.com/handleLogin?id=Ad9AzuznGGe50nrR-KqRrEvJ&amp;data=" method="post">

……

但实际的数据应该是:

<form href="http://CXXXXXXXX.com/handleLogin?id=Ad9AzuznGGe50nrR-KqRrEvJ&amp;data=A58157390E5FAFD5FEF53BDF5E2A6B5B" method="post">

……

少了一截数据,有人知道怎么回事么?

求指导!!!

tberg的主页 tberg | 菜鸟二级 | 园豆:207
提问于:2013-04-20 10:45
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册