A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-October/074813.html below:

[Python-Dev] OpenSSL httplib bug

[Python-Dev] OpenSSL httplib bug [Python-Dev] OpenSSL httplib bugRichie Ward richies at gmail.com
Mon Oct 1 01:11:11 CEST 2007
I was using httplib to power my xml rpc script.

I had problems when I wanted to use SSL and I got this error:
  File "/usr/lib/python2.5/httplib.py", line 1109, in recv
    return self._ssl.read(len)
socket.sslerror: (8, 'EOF occurred in violation of protocol')

I figured out this was because of poor error handling in python.

May I suggest this as a fix to this bug:
$ diff /usr/lib/python2.5/httplib.py /usr/lib/python2.5/httplib.py~
1109,1112c1109
<         try:
<             return self._ssl.read(len)
<         except socket.sslerror:
<             return
---
>         return self._ssl.read(len)

Just a note. I am by no means a python expert, just good enough to get
my work done.
I use Ubuntu gutsy.
-- 
Thanks, Richie Ward
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4