Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #654 (defect)

Opened 2 years ago

Last modified 2 years ago

More gracefull failure and traceback when client tries non-SSL connection to SSL server

Status: closed (fixed)

Reported by: guest Assigned to: fumanchu
Priority: normal Milestone: 3.0
Component: CherryPy code Keywords:
Cc:

It took me a while, and some help from fumanchu to track down a very silly problem.

When making a non-SSL connection to SSL server I got this traceback;

Exception in thread CP WSGIServer Thread-17:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/threading.py", line 460, in __bootstrap
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/CherryPy-3.0.0-py2.5.egg/cherrypy/wsgiserver.py", line 641, in run
    conn.communicate()
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/CherryPy-3.0.0-py2.5.egg/cherrypy/wsgiserver.py", line 594, in communicate
    req.simple_response("500 Internal Server Error", format_exc())
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/CherryPy-3.0.0-py2.5.egg/cherrypy/wsgiserver.py", line 373, in simple_response
    self.sendall("".join(buf))
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/CherryPy-3.0.0-py2.5.egg/cherrypy/wsgiserver.py", line 463, in ssl_method_wrapper
    return method(self, *args, **kwargs)
Error: [('SSL routines', 'SSL23_GET_CLIENT_HELLO', 'http request')]

After logging format_exc() to look at it read;

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/CherryPy-3.0.0-py2.5.egg/cherrypy/wsgiserver.py", line 576, in communicate
    req.parse_request()
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/CherryPy-3.0.0-py2.5.egg/cherrypy/wsgiserver.py", line 126, in parse_request
    request_line = self.rfile.readline()
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/CherryPy-3.0.0-py2.5.egg/cherrypy/wsgiserver.py", line 463, in ssl_method_wrapper
    return method(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/socket.py", line 345, in readline
    data = self._sock.recv(self._rbufsize)
Error: [('SSL routines', 'SSL23_GET_CLIENT_HELLO', 'http request')]

Change History

02/09/07 17:26:55: Modified by fumanchu

  • owner changed from rdelon to fumanchu.
  • status changed from new to assigned.
  • description changed.
  • milestone set to 3.0.

02/16/07 13:22:29: Modified by fumanchu

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [1618]. The builtin WSGI server now responds with "400 Bad Request" using HTTP.

Hosted by WebFaction

Log in as guest/cpguest to create tickets