Comment 0 for bug 143564

Revision history for this message
Patrick Gerken (do3cc) wrote :

Uploaded: HTTPRequest.py.patch

I try to resolve a nonexistent URL with ZPublisher.HTTPRequest.resolve_url(). This raises an error, and the comment in the beginning of the method promises, it would raise the same error it would raise if somebody would have called this URL. But it raises a type error.
This is what happens:
In the line where it wants to raise the error, some arguments got set wrong:
raise rsp.errmsg, sys.exc_info()[1]

rsp.errmsg is a string, and raise will raise now rsp.errmsg.__class__(sys.exc_info()[1]) which terribly fails, and raises an TypeError.
A Patch is attached.
To apply it, go to the directory where HTTPRequest.py resides and enter
patch HTTPRequest.py < /some/path/HTTPRequest.py.patch