rendered paste body[jtate@dhcp245 cherrypy-trunk]$ svn diff
Index: cherrypy/_cperror.py
===================================================================
--- cherrypy/_cperror.py (revision 1307)
+++ cherrypy/_cperror.py (working copy)
@@ -5,6 +5,8 @@
from urlparse import urljoin as _urljoin
from cherrypy.lib import http as _http
+class Exception(exceptions.Exception):
+ pass
class InternalRedirect(Exception):
"""Exception raised when processing should be handled by a different path.
[jtate@dhcp245 cherrypy-trunk]$ svn revert cherrypy/_cpe
_cpengine.py _cperror.py
[jtate@dhcp245 cherrypy-trunk]$ svn revert cherrypy/_cperror.py
Reverted 'cherrypy/_cperror.py'
[jtate@dhcp245 cherrypy-trunk]$ python cherrypy/test/test.py
Python version used to run this test script: 2.4.1
CherryPy version 2.2.1
HTTP server version HTTP/1.1
Running tests: cherrypy._cpwsgi.WSGIServer
Python version used to run this test script: 2.4.1
CherryPy version 2.2.1
HTTP server version HTTP/1.1
Running tests: cherrypy._cpwsgi.WSGIServer
01/Sep/2006:16:31:32 CONFIG INFO Server parameters:
01/Sep/2006:16:31:32 CONFIG INFO server.environment: development
01/Sep/2006:16:31:32 CONFIG INFO server.log_to_screen: True
01/Sep/2006:16:31:32 CONFIG INFO server.log_file:
01/Sep/2006:16:31:32 CONFIG INFO server.log_tracebacks: True
01/Sep/2006:16:31:32 CONFIG INFO server.log_request_headers: True
01/Sep/2006:16:31:32 CONFIG INFO server.protocol_version: HTTP/1.1
01/Sep/2006:16:31:32 CONFIG INFO server.socket_host: 127.0.0.1
01/Sep/2006:16:31:32 CONFIG INFO server.socket_port: 8080
01/Sep/2006:16:31:32 CONFIG INFO server.socket_file:
01/Sep/2006:16:31:32 CONFIG INFO server.reverse_dns: False
01/Sep/2006:16:31:32 CONFIG INFO server.socket_queue_size: 5
01/Sep/2006:16:31:32 CONFIG INFO server.thread_pool: 10
testProxy (test_proxy.ProxyTest) ... 01/Sep/2006:16:31:32 HTTP INFO Serving HTTP on http://127.0.0.1:8080/
127.0.0.1 - - [01/Sep/2006:16:31:32] "GET / HTTP/1.1" 303 148 "" ""
ERROR: 'Location':'http://www.mydomain.com/dummy' not in headers
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
127.0.0.1 - - [01/Sep/2006:16:31:37] "GET / HTTP/1.1" 303 148 "" ""
ERROR: 'Location':'http://www.yetanother.com/dummy' not in headers
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
127.0.0.1 - - [01/Sep/2006:16:31:38] "GET / HTTP/1.1" 303 148 "" ""
ERROR: 'Location':'http://www.yetanother.com/dummy' not in headers
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
01/Sep/2006:16:31:39 HTTP INFO Page handler: <bound method Root.remoteip of <test_proxy.Root instance at 0xb7c04b8c>>
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 105, in _run
self.main()
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 254, in main
body = page_handler(*virtual_path, **self.params)
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_proxy.py", line 14, in remoteip
return cherrypy.request.remote.ip
File "/usr/lib/python2.4/site-packages/cherrypy/__init__.py", line 43, in __getattr__
return getattr(childobject, name)
AttributeError: 'Request' object has no attribute 'remote'
Request Headers:
Content-Length:
Remote-Addr: 127.0.0.1
Content-Type:
X-FORWARDED-FOR: 192.168.0.20
HOST: 127.0.0.1:8080
Remote-Host: 127.0.0.1
127.0.0.1 - - [01/Sep/2006:16:31:39] "GET /remoteip HTTP/1.1" 500 1482 "" ""
ERROR: expected body:
'192.168.0.20'
actual body:
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\n<head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>\n <title>500 Internal error</title>\n <style type="text/css">\n #powered_by {\n margin-top: 20px;\n border-top: 2px solid black;\n font-style: italic;\n }\n\n #traceback {\n color: red;\n }\n </style>\n</head>\n <body>\n <h2>500 Internal error</h2>\n <p>The server encountered an unexpected condition which prevented it from fulfilling the request.</p>\n <pre id="traceback">Page handler: <bound method Root.remoteip of <test_proxy.Root instance at 0xb7c04b8c>>\nTraceback (most recent call last):\n File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 105, in _run\n self.main()\n File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 254, in main\n body = page_handler(*virtual_path, **self.params)\n File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_proxy.py", line 14, in remoteip\n return cherrypy.request.remote.ip\n File "/usr/lib/python2.4/site-packages/cherrypy/__init__.py", line 43, in __getattr__\n return getattr(childobject, name)\nAttributeError: \'Request\' object has no attribute \'remote\'\n</pre>\n <div id="powered_by">\n <span>Powered by <a href="http://www.cherrypy.org">CherryPy 2.2.1</a></span>\n </div>\n </body>\n</html>\n'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
01/Sep/2006:16:31:41 HTTP INFO Page handler: <bound method Root.remoteip of <test_proxy.Root instance at 0xb7c04b8c>>
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 105, in _run
self.main()
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 254, in main
body = page_handler(*virtual_path, **self.params)
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_proxy.py", line 14, in remoteip
return cherrypy.request.remote.ip
File "/usr/lib/python2.4/site-packages/cherrypy/__init__.py", line 43, in __getattr__
return getattr(childobject, name)
AttributeError: 'Request' object has no attribute 'remote'
Request Headers:
Content-Length:
Remote-Addr: 127.0.0.1
Content-Type:
X-FORWARDED-FOR: 67.15.36.43, 192.168.0.20
HOST: 127.0.0.1:8080
Remote-Host: 127.0.0.1
127.0.0.1 - - [01/Sep/2006:16:31:41] "GET /remoteip HTTP/1.1" 500 1482 "" ""
ERROR: expected body:
'192.168.0.20'
actual body:
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\n<head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>\n <title>500 Internal error</title>\n <style type="text/css">\n #powered_by {\n margin-top: 20px;\n border-top: 2px solid black;\n font-style: italic;\n }\n\n #traceback {\n color: red;\n }\n </style>\n</head>\n <body>\n <h2>500 Internal error</h2>\n <p>The server encountered an unexpected condition which prevented it from fulfilling the request.</p>\n <pre id="traceback">Page handler: <bound method Root.remoteip of <test_proxy.Root instance at 0xb7c04b8c>>\nTraceback (most recent call last):\n File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 105, in _run\n self.main()\n File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 254, in main\n body = page_handler(*virtual_path, **self.params)\n File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_proxy.py", line 14, in remoteip\n return cherrypy.request.remote.ip\n File "/usr/lib/python2.4/site-packages/cherrypy/__init__.py", line 43, in __getattr__\n return getattr(childobject, name)\nAttributeError: \'Request\' object has no attribute \'remote\'\n</pre>\n <div id="powered_by">\n <span>Powered by <a href="http://www.cherrypy.org">CherryPy 2.2.1</a></span>\n </div>\n </body>\n</html>\n'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
127.0.0.1 - - [01/Sep/2006:16:31:44] "GET /xhost HTTP/1.1" 303 146 "" ""
ERROR: 'Location':'http://www.yetanother.com/blah' not in headers
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
ok
testCaching (test_caching.CacheTest) ... 127.0.0.1 - - [01/Sep/2006:16:31:45] "GET / HTTP/1.1" 200 56 "" ""
ERROR: expected body:
'visit #1'
actual body:
'visit #1\n<br/><br/>Build time: 0.079s, Page size: 0.01KB'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
127.0.0.1 - - [01/Sep/2006:16:31:46] "GET / HTTP/1.1" 200 56 "" ""
ERROR: expected body:
'visit #1'
actual body:
'visit #2\n<br/><br/>Build time: 0.006s, Page size: 0.01KB'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
ERROR: 'Age' not in headers
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
ERROR
testExpiresTool (test_caching.CacheTest) ... 127.0.0.1 - - [01/Sep/2006:16:31:47] "GET /expires/specific HTTP/1.1" 200 67 "" ""
ERROR: 'Expires' not in headers
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
127.0.0.1 - - [01/Sep/2006:16:31:48] "GET /expires/wrongtype HTTP/1.1" 200 53 "" ""
ERROR: Status ('200 OK') != 500
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
ERROR: 'TypeError' not in body
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
01/Sep/2006:16:31:49 HTTP INFO Page handler: "The path '/expires/index.html' was not found."
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 105, in _run
self.main()
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 246, in main
page_handler, object_path, virtual_path = self.mapPathToObject(path)
File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 312, in mapPathToObject
raise cherrypy.NotFound(objectpath)
NotFound: 404
Request Headers:
Content-Length:
Remote-Addr: 127.0.0.1
Content-Type:
HOST: 127.0.0.1:8080
Remote-Host: 127.0.0.1
127.0.0.1 - - [01/Sep/2006:16:31:49] "GET /expires/index.html HTTP/1.1" 404 1241 "" ""
ERROR: Status ('404 Not Found') != '200 OK'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
127.0.0.1 - - [01/Sep/2006:16:31:49] "GET /expires/cacheable HTTP/1.1" 200 66 "" ""
127.0.0.1 - - [01/Sep/2006:16:31:49] "GET /expires/dynamic HTTP/1.1" 200 62 "" ""
ERROR: expected body:
'D-d-d-dynamic!'
actual body:
'D-d-d-dynamic!\n<br/><br/>Build time: 0.005s, Page size: 0.01KB'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
127.0.0.1 - - [01/Sep/2006:16:31:50] "GET /expires/force HTTP/1.1" 200 62 "" ""
ERROR: 'Pragma':'no-cache' not in headers
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
ERROR
======================================================================
ERROR: testCaching (test_caching.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_caching.py", line 76, in testCaching
age = int(self.assertHeader("Age"))
TypeError: int() argument must be a string or a number
======================================================================
ERROR: testExpiresTool (test_caching.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_caching.py", line 123, in testExpiresTool
if cherrypy.server.protocol_version == "HTTP/1.1":
AttributeError: 'Server' object has no attribute 'protocol_version'
FAILED (errors=2)
testConfig (test_config.ConfigTests) ...
ERROR: expected body:
'None'
actual body:
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\n<head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>\n <title>404 Not Found</title>\n <style type="text/css">\n #powered_by {\n margin-top: 20px;\n border-top: 2px solid black;\n font-style: italic;\n }\n\n #traceback {\n color: red;\n }\n </style>\n</head>\n <body>\n <h2>404 Not Found</h2>\n <p>The path \'/another/\' was not found.</p>\n <pre id="traceback">Page handler: "The path \'/another/\' was not found."\nTraceback (most recent call last):\n File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 105, in _run\n self.main()\n File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 246, in main\n page_handler, object_path, virtual_path = self.mapPathToObject(path)\n File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 312, in mapPathToObject\n raise cherrypy.NotFound(objectpath)\nNotFound: 404\n</pre>\n <div id="powered_by">\n <span>Powered by <a href="http://www.cherrypy.org">CherryPy 2.2.1</a></span>\n </div>\n </body>\n</html>\n'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
ok
testExternalDispatch (test_config.ConfigTests) ... ERROR
======================================================================
ERROR: testExternalDispatch (test_config.ConfigTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_config.py", line 79, in testExternalDispatch
cherrypy.request.app = cherrypy.tree.apps[""]
AttributeError: Tree instance has no attribute 'apps'
FAILED (errors=1)
test_100_Continue (test_conn.ConnectionTests) ... ERROR
test_Chunked_Encoding (test_conn.ConnectionTests) ... ERROR
test_HTTP10 (test_conn.ConnectionTests) ... 127.0.0.1 - - [01/Sep/2006:16:31:51] "GET /page2 HTTP/1.1" 200 88 "" ""
ERROR: expected body:
'pPeErRsSiIsStTeEnNcCeE oOfF vViIsSiIoOnN'
actual body:
'pPeErRsSiIsStTeEnNcCeE oOfF vViIsSiIoOnN\n<br/><br/>Build time: 0.005s, Page size: 0.04KB'
Show: [B]ody [H]eaders [S]tatus [U]RL; [I]gnore, [R]aise, or sys.e[X]it >> I
ERROR
test_HTTP11 (test_conn.ConnectionTests) ... ERROR
test_HTTP11_Timeout (test_conn.ConnectionTests) ... ERROR
test_HTTP11_pipelining (test_conn.ConnectionTests) ... ERROR
======================================================================
ERROR: test_100_Continue (test_conn.ConnectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_conn.py", line 223, in test_100_Continue
if cherrypy.server.protocol_version != "HTTP/1.1":
AttributeError: 'Server' object has no attribute 'protocol_version'
======================================================================
ERROR: test_Chunked_Encoding (test_conn.ConnectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_conn.py", line 275, in test_Chunked_Encoding
if cherrypy.server.protocol_version != "HTTP/1.1":
AttributeError: 'Server' object has no attribute 'protocol_version'
======================================================================
ERROR: test_HTTP10 (test_conn.ConnectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_conn.py", line 333, in test_HTTP10
self.getPage("/page3", headers=[("Connection", "Keep-Alive")])
File "/usr/lib/python2.4/site-packages/cherrypy/test/helper.py", line 48, in getPage
webtest.WebCase.getPage(self, url, headers, method, body, protocol)
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 150, in getPage
self.HTTP_CONN, protocol)
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 368, in openURL
conn = http_conn(host, port)
AttributeError: HTTPConnection instance has no __call__ method
======================================================================
ERROR: test_HTTP11 (test_conn.ConnectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_conn.py", line 53, in test_HTTP11
if cherrypy.server.protocol_version != "HTTP/1.1":
AttributeError: 'Server' object has no attribute 'protocol_version'
======================================================================
ERROR: test_HTTP11_Timeout (test_conn.ConnectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_conn.py", line 108, in test_HTTP11_Timeout
if cherrypy.server.protocol_version != "HTTP/1.1":
AttributeError: 'Server' object has no attribute 'protocol_version'
======================================================================
ERROR: test_HTTP11_pipelining (test_conn.ConnectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/cherrypy/test/webtest.py", line 223, in __call__
testMethod()
File "/home/jtate/devel/cherrypy-trunk/cherrypy/test/test_conn.py", line 185, in test_HTTP11_pipelining
if cherrypy.server.protocol_version != "HTTP/1.1":
AttributeError: 'Server' object has no attribute 'protocol_version'
FAILED (errors=6)
01/Sep/2006:16:34:12 ENGINE INFO <Ctrl-C> hit: shutting down autoreloader
01/Sep/2006:16:34:12 HTTP INFO HTTP Server shut down
01/Sep/2006:16:34:12 ENGINE INFO CherryPy shut down
hit enter
hit enter
Quit