【发布时间】:2010-05-28 19:00:05
【问题描述】:
我正在编写一些适用于网络服务器的脚本。
所以,我有以下代码:
client = suds.client.Client(WSDLfile)
client.service.Login('mylogin', 'mypass')
print client.options.transport.cookiejar
#######
sessnum = str(client.options.transport.cookiejar).split(' ')[1]
client = suds.client.Client( WSDLfile, headers= { 'Set-Cookie' : sessnum } )
在 FreeBSD 中运行时返回
<cookielib.CookieJar[<Cookie sessnum=9WAXQ25D37XY535F6SZ3GXKSCTZG8CVJ for .IP.IP.IP.IP/>]>
但在 Windows 中它返回
<cookielib.CookieJar[]>
我该如何解决?
【问题讨论】:
-
您在 Windows 方面得到的实际响应是什么?另外,查看您在两个平台上发送的请求,看看它们是否有任何不同:导入日志; logging.getLogger('suds.client').setLevel(logging.DEBUG); logging.getLogger('suds.transport').setLevel(logging.DEBUG).