Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting socket timeout crashes SSL? #37826

Closed
cba037 mannequin opened this issue Jan 24, 2003 · 4 comments
Closed

setting socket timeout crashes SSL? #37826

cba037 mannequin opened this issue Jan 24, 2003 · 4 comments
Labels
stdlib Python modules in the Lib dir

Comments

@cba037
Copy link
Mannequin

cba037 mannequin commented Jan 24, 2003

BPO 673797

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2005-02-27.19:32:19.000>
created_at = <Date 2003-01-24.03:58:44.000>
labels = ['library']
title = 'setting socket timeout crashes SSL?'
updated_at = <Date 2005-02-27.19:32:19.000>
user = 'https://bugs.python.org/cba037'

bugs.python.org fields:

activity = <Date 2005-02-27.19:32:19.000>
actor = 'pristine777'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2003-01-24.03:58:44.000>
creator = 'cba037'
dependencies = []
files = []
hgrepos = []
issue_num = 673797
keywords = []
message_count = 4.0
messages = ['14195', '14196', '14197', '14198']
nosy_count = 4.0
nosy_names = ['nnorwitz', 'cba037', 'gtalvola', 'pristine777']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue673797'
versions = ['Python 2.3']

@cba037
Copy link
Mannequin Author

cba037 mannequin commented Jan 24, 2003

First: bravo for compiling SSL support in the 2.3 binaries!

I can connect fine to a secure web server using HTTPS.
However, when I set a socket default timeout, I get
errors:

import socket
socket.setdefaulttimeout(30.0)
import urllib
f =
urllib.urlopen('https://members.tufts-health.com/memindex.html')
print f.read()

===================

Traceback (most recent call last):
  File "testssl.py", line 9, in ?
    f =
urllib.urlopen('https://members.tufts-health.com/memindex.html')
  File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
    return opener.open(url)
  File "/usr/lib/python2.3/urllib.py", line 181, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.3/urllib.py", line 375, in
open_https
    h.endheaders()
  File "/usr/lib/python2.3/httplib.py", line 695, in
endheaders
    self._send_output()
  File "/usr/lib/python2.3/httplib.py", line 581, in
_send_output
    self.send(msg)
  File "/usr/lib/python2.3/httplib.py", line 548, in send
    self.connect()
  File "/usr/lib/python2.3/httplib.py", line 945, in
connect
    ssl = socket.ssl(realsock, self.key_file,
self.cert_file)
socket.sslerror: (2, 'The operation did not complete
(read)')

===================
This is on Linux; similar behaviour on Win2K.

@cba037 cba037 mannequin closed this as completed Jan 24, 2003
@cba037 cba037 mannequin added the stdlib Python modules in the Lib dir label Jan 24, 2003
@cba037 cba037 mannequin closed this as completed Jan 24, 2003
@cba037 cba037 mannequin added the stdlib Python modules in the Lib dir label Jan 24, 2003
@gtalvola
Copy link
Mannequin

gtalvola mannequin commented Jan 31, 2003

Logged In: YES
user_id=88162

This is fixed by patch 676472 so when that patch is checked
in, this bug can be closed.

@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Feb 3, 2003

Logged In: YES
user_id=33168

The patch was checked in, so I'm closing this bug. Please
re-open if there are any problems.

@pristine777
Copy link
Mannequin

pristine777 mannequin commented Feb 27, 2005

Logged In: YES
user_id=1228732

This bug has resurfaced in Python 2.4.

The exact same code as in the original bug report gives the
same error. I also tried using urllib2 and it gives the same
result.

I have tried this only on Windows (both XP professional SP2,
and Windows Server 2003).

I am unable to re-open this bug report so should I just file a
new one?
Thanks!

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

0 participants