[Python-Dev] Are we having https/ssl problems?

Kevin Jacobs jacobs@penguin.theopalgroup.com
Mon, 8 Jul 2002 16:48:37 -0400 (EDT)


Hi all,

This is not a bug report.  It is more of a query to find out if there are
known problems with the current Python 2.3 CVS regarding SSL, httplib w/
https, or urllib w/ https.  I seem to remember tuning out some discussions
on timeout sockets and SSL of late, so I thought I would ask.  Here is code
that has worked previously, but does not in the current CVS:

  import urllib

  def get(url):
    u = urllib.urlopen(url)
    junk = ''
    while 1:
      chunk = u.read()
      if not chunk:
        break
      junk += chunk
    return junk

  exlen = len(get('https://dbserv2.theopalgroup.com/mediumfile'))
  aclen = len(get('https://dbserv2.theopalgroup.com/mediumfile'))

  print "File 1 len = %d, File 2 len = %d" % (exlen,aclen)

> python2.0 testhttps.py
HTTP len = 37140, HTTPS len = 37140

> python2.1 testhttps.py
HTTP len = 37140, HTTPS len = 37140

> python2.2 testhttps.py
HTTP len = 37140, HTTPS len = 37140

> python2.3 testhttps.py
HTTP len = 37140, HTTPS len = 0

If this doesn't ring a bell with anyone, I will battle SourceForge once more
and file a bug report.  The interesting thing is that the problem is
sensitive to the size of the file requested.  Here is what happens when I
use 'smallfile' instead of 'mediumfile':

> python2.3 testhttps.py
HTTP len = 3713, HTTPS len = 3713

-Kevin

--
Kevin Jacobs
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19         E-mail: jacobs@theopalgroup.com
Fax:   (216) 986-0714              WWW:    http://www.theopalgroup.com