Changeset 2488
- Timestamp:
- 08/04/09 19:23:34
- Files:
-
- branches/cherrypy-3.0.x/cherrypy/test/test_conn.py (modified) (1 diff)
- branches/cherrypy-3.0.x/cherrypy/wsgiserver/__init__.py (modified) (1 diff)
- branches/cherrypy-3.1.x/cherrypy/test/test_conn.py (modified) (1 diff)
- branches/cherrypy-3.1.x/cherrypy/wsgiserver/__init__.py (modified) (1 diff)
- trunk/cherrypy/test/test_conn.py (modified) (1 diff)
- trunk/cherrypy/wsgiserver/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-3.0.x/cherrypy/test/test_conn.py
r1565 r2488 332 332 self.assertEqual(status, 100) 333 333 while True: 334 skip = response.fp.readline().strip() 335 if not skip: 334 line = response.fp.readline().strip() 335 if line: 336 self.fail("100 Continue should not output any headers. Got %r" % line) 337 else: 336 338 break 337 339 branches/cherrypy-3.0.x/cherrypy/wsgiserver/__init__.py
r2250 r2488 294 294 # but it seems like it would be a big slowdown for such a rare case. 295 295 if environ.get("HTTP_EXPECT", "") == "100-continue": 296 self.simple_response(100) 296 # Don't use simple_response here, because it emits headers 297 # we don't want. See http://www.cherrypy.org/ticket/951 298 msg = "%s 100 Continue\r\n\r\n" % self.environ['ACTUAL_SERVER_PROTOCOL'] 299 try: 300 self.sendall(msg) 301 except socket.error, x: 302 if x.args[0] not in socket_errors_to_ignore: 303 raise 297 304 298 305 self.ready = True branches/cherrypy-3.1.x/cherrypy/test/test_conn.py
r2483 r2488 429 429 self.assertEqual(status, 100) 430 430 while True: 431 skip = response.fp.readline().strip() 432 if not skip: 431 line = response.fp.readline().strip() 432 if line: 433 self.fail("100 Continue should not output any headers. Got %r" % line) 434 else: 433 435 break 434 436 branches/cherrypy-3.1.x/cherrypy/wsgiserver/__init__.py
r2483 r2488 472 472 # but it seems like it would be a big slowdown for such a rare case. 473 473 if environ.get("HTTP_EXPECT", "") == "100-continue": 474 self.simple_response(100) 474 # Don't use simple_response here, because it emits headers 475 # we don't want. See http://www.cherrypy.org/ticket/951 476 msg = "%s 100 Continue\r\n\r\n" % self.environ['ACTUAL_SERVER_PROTOCOL'] 477 try: 478 self.wfile.sendall(msg) 479 except socket.error, x: 480 if x.args[0] not in socket_errors_to_ignore: 481 raise 475 482 476 483 self.ready = True trunk/cherrypy/test/test_conn.py
r2437 r2488 457 457 self.assertEqual(status, 100) 458 458 while True: 459 skip = response.fp.readline().strip() 460 if not skip: 459 line = response.fp.readline().strip() 460 if line: 461 self.fail("100 Continue should not output any headers. Got %r" % line) 462 else: 461 463 break 462 464 trunk/cherrypy/wsgiserver/__init__.py
r2485 r2488 457 457 # but it seems like it would be a big slowdown for such a rare case. 458 458 if environ.get("HTTP_EXPECT", "") == "100-continue": 459 self.simple_response(100) 459 # Don't use simple_response here, because it emits headers 460 # we don't want. See http://www.cherrypy.org/ticket/951 461 msg = "%s 100 Continue\r\n\r\n" % self.environ['ACTUAL_SERVER_PROTOCOL'] 462 try: 463 self.wfile.sendall(msg) 464 except socket.error, x: 465 if x.args[0] not in socket_errors_to_ignore: 466 raise 460 467 461 468 self.ready = True

