3

The following test passes with Python 2.7.11:

def test_urllib(self):
    import urllib2
    import ssl
    context = ssl._create_unverified_context() # service does not have a trusted cert
    url = urllib2.urlopen("https://intranet.adress:port/", context=context)
    url.read()

After upgrade to Python 2.7.13 the test fails with:

python/Lib/urllib2.py", line 1198, in do_open raise URLError(err) URLError: urlopen error Tunnel connection failed: 403 Forbidden

I tried some header and proxy settings, but without any success. I get always the same error. What has changed between Python 2.7.11 and 2.7.13 in SSL authentication?

Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366

1 Answers1

1

PS.: Python bug created for this issue. no_proxy content starting with dot (.domain) broken in Python 2.7.13

https://bugs.python.org/issue29142

  • 1
    Summary based on above report; the bug was introduced in Python on 30th April 2016 and was fixed on 9th of January 2017. Effected versions: 2.7.12, 2.7.13, 3.5.2, 3.6.0. The fix should be included in the following versions: 2.7.14, 3.5.3, 3.6.1 and 3.7.0. – Piotr Dobrogost Jan 13 '17 at 08:56