<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="9645298" data-permission-text="Title is private" data-url="https://github.com/psf/requests/issues/1083" data-hovercard-type="issue" data-hovercard-url="/psf/requests/issues/1083/hovercard" href="https://github.com/psf/requests/issues/1083">#1083</a>, perhaps. Standard <code class="notranslate">requests.get()</code> for this particular site/page <code class="notranslate">https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html</code> results in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import requests
&gt;&gt;&gt; requests.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/api.py&quot;, line 55, in get
    return request('get', url, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/api.py&quot;, line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 383, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 486, in send
    r = adapter.send(request, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py&quot;, line 385, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import requests
&gt;&gt;&gt; requests.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py", line 385, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
</code></pre></div>
<p dir="auto">Using <code class="notranslate">request-toolbelt</code>'s <code class="notranslate">SSLAdapter</code> to try various ssl versions, they all fail, it would seem... see following tracebacks.</p>
<p dir="auto">TLSv1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; adapter = SSLAdapter('TLSv1')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 395, in get
    return self.request('GET', url, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 383, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 486, in send
    r = adapter.send(request, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py&quot;, line 385, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; adapter = SSLAdapter('TLSv1')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py", line 385, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
</code></pre></div>
<p dir="auto">SSLv3:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; adapter = SSLAdapter('SSLv3')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 395, in get
    return self.request('GET', url, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 383, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 486, in send
    r = adapter.send(request, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py&quot;, line 385, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; adapter = SSLAdapter('SSLv3')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py", line 385, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
</code></pre></div>
<p dir="auto">SSLv2:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; adapter = SSLAdapter('SSLv2')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 395, in get
    return self.request('GET', url, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 383, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 486, in send
    r = adapter.send(request, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py&quot;, line 378, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='docs.apitools.com', port=443): Max retries exceeded with url: /2014/04/24/a-small-router-for-openresty.html (Caused by &lt;class 'socket.error'&gt;: [Errno 54] Connection reset by peer)"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; adapter = SSLAdapter('SSLv2')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html')
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='docs.apitools.com', port=443): Max retries exceeded with url: /2014/04/24/a-small-router-for-openresty.html (Caused by &lt;class 'socket.error'&gt;: [Errno 54] Connection reset by peer)
</code></pre></div>
<p dir="auto">Note the last one gives a <code class="notranslate">Connection reset by peer</code> error, which differs from the others, but I'm pretty sure SSLv2 isn't supported by the server anyhow.</p>
<p dir="auto">For fun, I tried to pass through some more appropriate headers through on the last request as well:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; headers = {
...     'Accept': u&quot;text/html,application/xhtml+xml,application/xml&quot;,
...     'User-Agent': u&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36&quot;,
...     'Accept-Encoding': u&quot;gzip,deflate&quot;,
...     'Accept-Language': u&quot;en-US,en;q=0.8&quot;
... }
&gt;&gt;&gt; adapter = SSLAdapter('SSLv2')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html', headers=headers)
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 395, in get
    return self.request('GET', url, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 383, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py&quot;, line 486, in send
    r = adapter.send(request, **kwargs)
  File &quot;/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py&quot;, line 378, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='docs.apitools.com', port=443): Max retries exceeded with url: /2014/04/24/a-small-router-for-openresty.html (Caused by &lt;class 'socket.error'&gt;: [Errno 54] Connection reset by peer)"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; headers = {
...     'Accept': u"text/html,application/xhtml+xml,application/xml",
...     'User-Agent': u"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36",
...     'Accept-Encoding': u"gzip,deflate",
...     'Accept-Language': u"en-US,en;q=0.8"
... }
&gt;&gt;&gt; adapter = SSLAdapter('SSLv2')
&gt;&gt;&gt; s = requests.Session()
&gt;&gt;&gt; s.mount('https://', adapter)
&gt;&gt;&gt; s.get('https://docs.apitools.com/2014/04/24/a-small-router-for-openresty.html', headers=headers)
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/Users/jaddison/.virtualenvs/techtown/lib/python2.7/site-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='docs.apitools.com', port=443): Max retries exceeded with url: /2014/04/24/a-small-router-for-openresty.html (Caused by &lt;class 'socket.error'&gt;: [Errno 54] Connection reset by peer)
</code></pre></div>
<p dir="auto">No dice there either. Here's what the HTTPS connection info in Chrome on Mac looks like:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/101148/2809354/44aa40b4-cd69-11e3-88f1-fabf089fe238.png"><img src="https://cloud.githubusercontent.com/assets/101148/2809354/44aa40b4-cd69-11e3-88f1-fabf089fe238.png" alt="screen shot 2014-04-26 at 10 35 21 am" style="max-width: 100%;"></a></p>
<p dir="auto">I'm not positive, but some googling indicates it's likely a cipher list issue, which is more urllib3, I think?</p>
<p dir="auto">I tried to modify <code class="notranslate">DEFAULT_CIPHER_LIST</code> in <code class="notranslate">pyopenssl</code>, but started running into import errors. At this point it seemed like things were just broken, and there wasn't really a proper way to approach fixing this yet.</p>
<p dir="auto">Version information:<br>
OSX Mavericks<br>
Python 2.7.5<br>
OpenSSL 0.9.8y 5 Feb 2013 - (from <code class="notranslate">python -c "import ssl; print ssl.OPENSSL_VERSION"</code>)<br>
requests 2.2.1<br>
requests-toolbelt 0.2.0<br>
urllib3 1.8</p>
<p dir="auto">Many web servers use the Host header to match different sites, probably the most important HTTP header.</p>
<p dir="auto">There is no Host entry in the response.request.headers, unless set explicitly when issuing the request.</p>