kennethreitz/requests — pull request #799 by joequery (2012-08-20 02:53:22+00:00)
Title: Fix SSL3 error on Ubuntu 12.04

When attempting to request (get or post) to a resource responding only to SSL version 3, we'd get the following response on Ubuntu 12.04:

```

>>> import requests
>>> requests.post("https://sis-portal-prod.uttyler.edu/psp/TAPPRD/EMPLOYEE/EMPL/?&cmd=login")
Traceback (most recent call last):
File "", line 1, in
File "requests/api.py", line 98, in post
return request('post', url, data=data, **kwargs)
File "requests/safe_mode.py", line 39, in wrapped
return function(method, url, **kwargs)
File "requests/api.py", line 51, in request
return session.request(method=method, url=url, **kwargs)
File "requests/sessions.py", line 243, in request
r.send(prefetch=prefetch)
File "requests/models.py", line 630, in send
raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

```

There's a [good number of people](http://www.google.com/search?q=python+error%3A1407742E%3ASSL+routines%3ASSL23_GET_SERVER_HELLO%3Atlsv1+alert+protocol+version&sugexp=chrome,mod=8&sourceid=chrome&ie=UTF-8) having the error.

Fix taken from [this thread](http://bugs.python.org/issue11220). Specs pass. Even if you don't accept this into master, hopefully someone will see this pull request on Google.