This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: https via httplib trips over IIS defect
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: detroit_dan, jhylton
Priority: normal Keywords:

Created on 2002-10-31 18:01 by detroit_dan, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Python-2.2_patch detroit_dan, 2002-10-31 18:01 Patch python-2.2.2 for SSL to IIS-4.0 server
Messages (3)
msg13012 - (view) Author: Dan Wilder (detroit_dan) Date: 2002-10-31 18:01
When attempting to make a connection via https to an 
IIS server, for example ssl.pgs.wcom.net deployed by
VITAL, the VISAnet on line authorization host, the
following
exception is encountered:

  File "./vitalmsg.py", line 130, in ssl_connect^M
    status, reason, header= hs.getreply()^M
  File "/usr/lib/python2.2/httplib.py", line 752, in
getreply^M
    response = self._conn.getresponse()^M
  File "/usr/lib/python2.2/httplib.py", line 593, in
getresponse^M
    response = self.response_class(self.sock)^M
  File "/usr/lib/python2.2/httplib.py", line 99, in
__init__^M
    self.fp = sock.makefile('rb', 0)^M
  File "/usr/lib/python2.2/httplib.py", line 628, in
makefile^M
    buf = self.__ssl.read()^M
socket.sslerror: (5, 'EOF occurred in violation of
protocol')^M

As nearly as I can determine, a protocol error has
indeed been encountered.  However it is unlikely indeed
that
Microsoft can be induced to correct this, nor that a
correction
is likely to be deployed by all who use IIS.

For reference, the headers returned by the server to a
successful request using the attached patch are:

Server: Microsoft-IIS/4.0
Date: Tue, 29 Oct 2002 21:57:59 GMT
Content-Type: x-data/xact-response

The attached patch allows python-2.2.2 to work
with this server.



msg13013 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-11-13 17:49
Logged In: YES 
user_id=31392

This patch has two changes that seem to be completely
unrelated.  It looks like the httplib.py patch works around
the IIS problem and the socket stuff is gratuitous.

I don't understand if it's safe to add this workaround for
IIS.  What an EOF occurs that is a violation of the protocol
and means that the client can't recover?  It seems this
patch could prevent legitimate errors from being corrected.
msg13014 - (view) Author: Dan Wilder (detroit_dan) Date: 2002-11-13 22:03
Logged In: YES 
user_id=639879

Problem has been reported previously and is apparently
resolved in
Python-2.3.  See item number 500311.

Attached patch was erroneously believed by me to be the work of
a developer I'm working with; upon contacting him, I
discovered that
it was none other than work previously submitted to this site by
vdbergh!

My misunderstanding.

Apologies.  Please consider item closed.

-- 
Dan Wilder
History
Date User Action Args
2022-04-10 16:05:48adminsetgithub: 37394
2002-10-31 18:01:54detroit_dancreate