I dug further...

The tg.configuration.AppConfig::add_error_middleware() uses/wraps
pylons' StatusCodeRedirect().
http://turbogears.org/2.0/docs/modules/pylons/middleware.html
The tg.decorators.RestController::_check_security() sets the response
code (presumably to 401).

Even if I set the environ['pylons.set_redirect_code'] = True, the
response code returned is not 401 (instead it is still 302).  Why is
this so?  Because, StatusCodeRedirect.__call__() is called with the
status code already set to 302.  So somewhere after the the response
code is set to 401, but before StatusCodeRedirect is called, some
entity is setting the status to 302.  Where?  I keep digging....

The Challenger and ChallengeDecider plugins all get a status code of
302.

I keep digging ...

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to