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

Changeset 1286

Show
Ignore:
Timestamp:
08/26/06 19:29:50
Author:
fumanchu
Message:

Further fix for persistent conns (ignore timeouts).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cpwsgiserver.py

    r1284 r1286  
    2929# de-dupe the list 
    3030socket_errors_to_ignore = dict.fromkeys(socket_errors_to_ignore).keys() 
     31socket_errors_to_ignore.append("timed out") 
    3132 
    3233# These are lowercase because mimetools.Message uses lowercase keys. 
  • trunk/cherrypy/test/test_conn.py

    r1279 r1286  
    131131            response.begin() 
    132132            self.assertEqual(response.status, 200) 
     133            self.body = response.read() 
     134            self.assertBody(pov) 
    133135             
    134136            # Make a second request on the same socket 
     
    139141            response.begin() 
    140142            self.assertEqual(response.status, 200) 
     143            self.body = response.read() 
     144            self.assertBody("Hello, world!") 
    141145             
    142146            # Wait for our socket timeout 
     
    151155             
    152156            conn.close() 
     157             
     158            # Make another request on a new socket, which should work 
     159            conn = httplib.HTTPConnection(self.HOST, self.PORT) 
     160            conn.auto_open = False 
     161            conn.connect() 
     162            conn.putrequest("GET", "/", skip_host=True) 
     163            conn.putheader("Host", self.HOST) 
     164            conn.endheaders() 
     165            response = conn.response_class(conn.sock, method="GET") 
     166            response.begin() 
     167            self.assertEqual(response.status, 200) 
     168            self.body = response.read() 
     169            self.assertBody(pov) 
    153170        finally: 
    154171            if old_timeout is not None: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets