summaryrefslogtreecommitdiff
path: root/paste/webkit/FakeWebware/WebKit/HTTPExceptions.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-06-29 23:11:15 +0000
committerianb <devnull@localhost>2005-06-29 23:11:15 +0000
commitef0891eb3d26c8ae3464c9a7adf8093ddec9ad7b (patch)
tree8f799fed811260cf71ec68cc16ec5f0af8461bcd /paste/webkit/FakeWebware/WebKit/HTTPExceptions.py
parent305eafd83a1a50bf97c5a27f64548eaab8f9c340 (diff)
downloadpaste-ef0891eb3d26c8ae3464c9a7adf8093ddec9ad7b.tar.gz
Made HTTPUnauthorized use a realm argument, so that it is compatible with Webware
Diffstat (limited to 'paste/webkit/FakeWebware/WebKit/HTTPExceptions.py')
-rw-r--r--paste/webkit/FakeWebware/WebKit/HTTPExceptions.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/paste/webkit/FakeWebware/WebKit/HTTPExceptions.py b/paste/webkit/FakeWebware/WebKit/HTTPExceptions.py
index ac167be..e64978b 100644
--- a/paste/webkit/FakeWebware/WebKit/HTTPExceptions.py
+++ b/paste/webkit/FakeWebware/WebKit/HTTPExceptions.py
@@ -1,2 +1,8 @@
from paste.httpexceptions import *
-HTTPAuthenticationRequired = HTTPUnauthorized
+
+class HTTPAuthenticationRequired(HTTPUnauthorized):
+
+ def __init__(self, realm=None, message=None, headers=None):
+ headers = headers or {}
+ headers['WWW-Authenticate'] = 'Basic realm=%s' % realm
+ HTTPUnathorized.__init__(self, message, headers)