From 96f94af7b175fcb5f85b71bcc2d0cd419212f80d Mon Sep 17 00:00:00 2001 From: ianb Date: Mon, 19 Dec 2005 23:13:04 +0000 Subject: Handle case of no headers and proper error message --- paste/httpexceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'paste/httpexceptions.py') diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py index 837fd66..cd08909 100644 --- a/paste/httpexceptions.py +++ b/paste/httpexceptions.py @@ -157,7 +157,7 @@ class HTTPException(Exception): assert isinstance(comment, (type(None), basestring)) self.headers = headers or tuple() for req in self.required_headers: - assert has_header(headers, req) + assert headers and has_header(headers, req) if detail is not None: self.detail = detail if comment is not None: -- cgit v1.2.1