0
的肥皂錯誤,而試圖對某些URL蟒蛇pycurl給予了GNUTLS
def call_soap_curl(ncServerURL, xml, action):
c = pycurl.Curl()
c.setopt(pycurl.URL, ncServerURL)
c.setopt(pycurl.POST, 1)
c.setopt(pycurl.SSL_VERIFYPEER, 0)
c.setopt(pycurl.SSL_VERIFYHOST, 0)
header=["Content-type: text/xml","SOAPAction:"+action,'Content-Type: text/xml; charset=utf-8','Content-Length: '+str(len(xml))]
print header
c.setopt(pycurl.HTTPHEADER, header)
c.setopt(pycurl.POSTFIELDS, str(xml))
import StringIO
b = StringIO.StringIO()
c.setopt(pycurl.WRITEFUNCTION, b.write)
c.perform()
ncServerData = b.getvalue()
return ncServerData
錯誤m到處pycurl是
(56, 'GnuTLS recv error (-9): A TLS packet with unexpected length was received.')
@c.perform()
請建議什麼都可以啦,我怎麼能解決這個問題。 使用Ubuntu和捲曲相同的URL在PHP工作
這是我
pycurl.version_info()
(3, '7.21.6', 464134, 'x86_64-pc-linux-gnu', 17981, 'GnuTLS/2.10.5', 0, '1.2.3.4', ('dict', 'file', 'ftp', 'ftps', 'gopher', 'http', 'https', 'imap', 'imaps', 'ldap', 'pop3', 'pop3s', 'rtmp', 'rtsp', 'smtp', 'smtps', 'telnet', 'tftp'), None, 0, '1.22')
按照這個http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515200做到了,如果沒有其他解決辦法請建議。 – XMen 2012-03-15 08:37:42