title: http.client.RemoteDisconnected: Remote end closed connection without response error using driver.quit() of Selenium Python
body: <p>I'm using:</p>
  <ul>
  <li>Python 3.8</li>
  <li>Selenium 3.141.0</li>
  <li>Windows 10 (behind a proxy)</li>
  <li>Chrome:84.0.4147.105</li>
  <li>Chromedriver:84.0.4147.30</li>
  <li>Mac 10.15.6 (does not has a proxy)</li>
  </ul>
  <p>Here is my code:</p>
  <pre><code>from selenium import webdriver
  
  driver = webdriver.Chrome(&quot;D:/webdriver/chromedriver.exe&quot;)
  driver.get(&quot;https://github.com&quot;)
  driver.quit()
  </code></pre>
  <p>When executing <code>driver.quit()</code>, the exception raise:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:/Users/taiping/Desktop/data_test/selenium_test.py&quot;, line 5, in &lt;module&gt;
      driver.quit()
    File &quot;D:\python3.8\lib\site-packages\selenium\webdriver\chrome\webdriver.py&quot;, line 158, in quit
      self.service.stop()
    File &quot;D:\python3.8\lib\site-packages\selenium\webdriver\common\service.py&quot;, line 151, in stop
      self.send_remote_shutdown_command()
    File &quot;D:\python3.8\lib\site-packages\selenium\webdriver\common\service.py&quot;, line 127, in send_remote_shutdown_command
      url_request.urlopen(&quot;%s/shutdown&quot; % self.service_url)
    File &quot;D:\python3.8\lib\urllib\request.py&quot;, line 222, in urlopen
      return opener.open(url, data, timeout)
    File &quot;D:\python3.8\lib\urllib\request.py&quot;, line 525, in open
      response = self._open(req, data)
    File &quot;D:\python3.8\lib\urllib\request.py&quot;, line 542, in _open
      result = self._call_chain(self.handle_open, protocol, protocol +
    File &quot;D:\python3.8\lib\urllib\request.py&quot;, line 502, in _call_chain
      result = func(*args)
    File &quot;D:\python3.8\lib\urllib\request.py&quot;, line 1379, in http_open
      return self.do_open(http.client.HTTPConnection, req)
    File &quot;D:\python3.8\lib\urllib\request.py&quot;, line 1354, in do_open
      r = h.getresponse()
    File &quot;D:\python3.8\lib\http\client.py&quot;, line 1332, in getresponse
      response.begin()
    File &quot;D:\python3.8\lib\http\client.py&quot;, line 303, in begin
      version, status, reason = self._read_status()
    File &quot;D:\python3.8\lib\http\client.py&quot;, line 272, in _read_status
      raise RemoteDisconnected(&quot;Remote end closed connection without&quot;
  http.client.RemoteDisconnected: Remote end closed connection without response
  </code></pre>
  <p>But this code has no error on my Macbook. What's the problem?</p>
  <p>Updated: 2020-08-05</p>
  <p>I open the debugger and found that every <code>HTTPConnection</code> object have been set the system wide http proxy. But I did not set any options explicitly in my code. And the <code>driver.quit</code> method will send http://localhost:59717/shutdown to chrome to perform quit. So I guess the shutdown url is actually sent to the proxy server, not the local browser.</p>
  <p>And I try to use fiddler to check the request informations. There is another problem that I can not decode the https requests because of some certificates configs. So I change the argument of <code>driver.get()</code> to an internal web url of my company. The result is : If I close fiddler, <code>RemoteDisconnected</code> error raise again. And if I open fiddler, all works.</p>
  <p>What happened? I know fiddler set the proxy to 127.0.0.1:8888, so I think there could be something wrong with the proxy settings. But I can not fix it. I guess the chrome use the system proxy so the github home page could open correctly, but when send shutdown url to chrome, the request object should not use the system proxy, but it does.</p>
  <p>Am I right? And how to fix this problem?</p>