title: HTTPS proxy server python
body: <p>I have a problem with my ssl server (in Python).
  I set the SSL proxy connection in my browser, and try to connect to my ssl server.</p>
  
  <p>This is the server:</p>
  
  <pre><code>import BaseHTTPServer, SimpleHTTPServer
  import ssl
  
  httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 443), SimpleHTTPServer.SimpleHTTPRequestHandler)
  httpd.socket = ssl.wrap_socket (httpd.socket, server_side=True, certfile='server.crt', keyfile='server.key', do_handshake_on_connect=False)
  httpd.serve_forever()
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>SSLError: [SSL: HTTPS_PROXY_REQUEST] https proxy request (_ssl.c:1750)
  </code></pre>
  
  <p>I try to connect to the server in the browser.
  its work if I went to address "<a href="https://127.0.0.1:443" rel="nofollow">https://127.0.0.1:443</a>".
  But, if I use in the server to proxy, I get the error...</p>
  
  <p>How can I fix this?</p>