【问题标题】:Huge amount of time sending data with suds and proxy使用 suds 和代理发送数据的大量时间
【发布时间】:2009-12-17 15:31:24
【问题描述】:

我有以下代码使用 suds 通过代理发送数据:

 import suds
 t = suds.transport.http.HttpTransport()
 proxy = urllib2.ProxyHandler({'http': 'http://192.168.3.217:3128'})
 opener = urllib2.build_opener(proxy)
 t.urlopener = opener
 ws = suds.client.Client('http://xxxxxxx/web.asmx?WSDL', transport=t)
 req = ws.factory.create('ActionRequest.request')
 req.SerialNumber = 'asdf'
 req.HostName = 'hola'
 res = ws.service.ActionRequest(req)

我不知道为什么,但它发送数据的时间可能超过 2 或 3 分钟,甚至更长,并且有时会引发“网关超时”异常。如果我不使用代理,则使用的时间超过 2 秒或更短。这是 SOAP 回复:

(ActionResponse){
   Id = None
   Action = "Action.None"
   Objects = ""
 }

代理通过 urllib2 或使用普通的网络浏览器(如 firefox)与其他请求一起运行。

有人知道这里发生了什么泡沫吗?

提前非常感谢!!!

【问题讨论】:

    标签: python proxy suds


    【解决方案1】:

    嗅探器输出(例如来自wireshark)可能对理解这一点非常有帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-16
      • 1970-01-01
      • 1970-01-01
      • 2020-04-03
      • 2011-03-23
      相关资源
      最近更新 更多