| 1 |
Index: _cperror.py |
|---|
| 2 |
=================================================================== |
|---|
| 3 |
RCS file: /cvs/third-party/CherryPy/cherrypy/_cperror.py,v |
|---|
| 4 |
retrieving revision 1.1.1.1 |
|---|
| 5 |
diff -u -p -b -r1.1.1.1 _cperror.py |
|---|
| 6 |
--- _cperror.py 27 Mar 2006 05:31:03 -0000 1.1.1.1 |
|---|
| 7 |
+++ _cperror.py 12 Apr 2006 16:25:54 -0000 |
|---|
| 8 |
|
|---|
| 9 |
def __init__(self, path, params=None): |
|---|
| 10 |
import cherrypy |
|---|
| 11 |
import cgi |
|---|
| 12 |
+ import urlparse |
|---|
| 13 |
request = cherrypy.request |
|---|
| 14 |
|
|---|
| 15 |
# Set a 'path' member attribute so that code which traps this |
|---|
| 16 |
# error can have access to it. |
|---|
| 17 |
- self.path = path |
|---|
| 18 |
+ # |
|---|
| 19 |
+ # Note that urljoin will "do the right thing" whether url is: |
|---|
| 20 |
+ # 1. a URL relative to root (e.g. "/dummy") |
|---|
| 21 |
+ # 2. a URL relative to the current path |
|---|
| 22 |
+ self.path = urlparse.urljoin(request.object_path, path) |
|---|
| 23 |
|
|---|
| 24 |
if params is not None: |
|---|
| 25 |
if isinstance(params, basestring): |
|---|