Prevent wsgi from modifying 401 responses.

Posted by Gary van der Merwe on Stack Overflow See other posts from Stack Overflow or by Gary van der Merwe
Published on 2010-03-23T09:45:04Z Indexed on 2010/03/23 9:53 UTC
Read the original article Hit count: 574

Filed under:
|
|

If I have the following pylons controller:

def challange(self):
    response.status = '401 Unauthorized'
    return 'You are not logged in.'

I would expect to see 'You are not logged in.' But I see :

Unauthorized

This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.


WSGI Server

I have disabled the pylons error middleware. But the wsig server seems to be modifying the response. How do I stop this?

© Stack Overflow or respective owner

Related posts about wsgi

Related posts about pylons