1 message in org.python.python-bugs-list[ python-Bugs-913619 ] httplib: HTTPS...
FromSent OnAttachments
SourceForge.netMar 10, 2004 12:00 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-913619 ] httplib: HTTPS does not close() connection properlyActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 10, 2004 12:00:02 pm
List:org.python.python-bugs-list

Bugs item #913619, was opened at 2004-03-10 12:00 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=913619&group_id=5470

Category: Python Library Group: Python 2.3 Status: Open Resolution: None Priority: 5 Submitted By: rick (sf_rick) Assigned to: Nobody/Anonymous (nobody) Summary: httplib: HTTPS does not close() connection properly

Initial Comment: When looping through requests to an HTTP server close() closes out the active connection. An the second loop through a new HTTP connection is created.

When looping through requests to an HTTPS server close() does not close the connection. It keeps it active. On the second pass through the loop httplib.HTTPS uses the previously initiated connection. Shouldn't close() close out the connection as it does for the HTTP connection?

sample code to illustrate:

def getdata(): params = urllib.urlencode({'username': 'test', 'password': 'test'}) h = httplib.HTTPS(host = "test.site.com", port = 443, key_file = "fake.pem", cert_file = "fake.pem") h.putrequest('POST', '/scripts/cgi.exe?') h.putheader('Content-length', '%d'%len(params)) h.putheader('Accept', 'text/plain') h.putheader('Host', 'test.site.com') h.endheaders() h.send(params) reply, msg, hdrs = h.getreply() data = h.getfile().read() file('test.file', 'w').write(data) h.close()

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