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

Ticket #625 (defect)

Opened 2 years ago

Last modified 2 years ago

SSL: Writing to timed out socket didn't fail as it should have

Status: closed (fixed)

Reported by: fumanchu Assigned to: fumanchu
Priority: normal Milestone: 3.0
Component: CherryPy code Keywords: ssl
Cc:
C:\Python24\Lib\site-packages>python cherrypy\test\test.py --ssl
Python version used to run this test script: 2.4.2
CherryPy version 3.0.0RC1
HTTP server version HTTP/1.1 (ssl)


Running tests: cherrypy._cpwsgi.CPWSGIServer
No handlers could be found for logger "cherrypy.error"

...

======================================================================
FAIL: test_HTTP11_Timeout (test_conn.ConnectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\cherrypy\test\webtest.py", line 306, in __call__
    testMethod()
  File "C:\Python24\Lib\site-packages\cherrypy\test\test_conn.py", line 203, in test_HTTP11_Timeout
    self.fail("Writing to timed out socket didn't fail"
AssertionError: Writing to timed out socket didn't fail as it should have: Hello, world!

In addition, since [1530], the test suite does not terminate due to the Demo.stream function in test_tools continuing to spit out values after the connection was closed by the client.

Change History

12/21/06 03:05:12: Modified by lawouach

Could it be a problem with our use of httplib used to handle the client connection?

When I look at httplib.HTTPResposne.begin it does not seem clear to me that it will raise an error when the socket was timedout anyway:

http://svn.python.org/view/python/trunk/Lib/httplib.py?rev=52736&view=markup

12/21/06 11:40:26: Modified by fumanchu

That may be; the more pressing problem is that the server shouldn't be sending the output in either situation.

12/21/06 14:47:14: Modified by fumanchu

  • status changed from new to assigned.

Partial fix in [1549].

12/21/06 15:01:51: Modified by fumanchu

Better partial fix in [1550].

12/21/06 17:46:18: Modified by fumanchu

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

Final fix in [1552]. SSL write methods that raised errors were passing silently. It's OK for read methods to return "" because that's the typical way to notice that a socket has no more data to read.

Hosted by WebFaction

Log in as guest/cpguest to create tickets