3 messages in com.googlegroups.pylons-discussheaders from abort() don't show up in...
FromSent OnAttachments
Sergey Lipnevich23 Oct 2006 22:09 
Philip Jenvey24 Oct 2006 10:07 
Sergey24 Oct 2006 11:59 
Subject:headers from abort() don't show up in response
From:Sergey Lipnevich (s.li@public.gmane.org)
Date:10/23/2006 10:09:16 PM
List:com.googlegroups.pylons-discuss

Hi,

I'm trying to add a WWW-Authenticate header using abort():

abort(401, "Authentication is required", [('WWW-Authenticate', 'Basic realm="realm"')])

The code shows up correctly in the response, but my header does not. In the error controller, if I do this:

def document(self): return Response()

I get back "401 Unauthorized" but not the WWW-Authenticate. From the code, it looks like start_response in class paste.httpexceptions.HTTPException has access to headers supplied in abort() and should include them in the response, but it doesn't (or I'm not using something correctly). Any help is appreciated, thanks in advance!

Sergey.