Jorge Vargas wrote:
> Hi, I'm not 100% sure if this bug is introduced by TG's
> ErrorController or pylons or the new WSGIAppController (or any other
> changes in between) But the above configuration is "eating up the 401"
> response, and displaying it as an error, while the expected behavior
> is to trigger repoze.who.
>
> Could someone confirm or deny this is a bug in TG? also I'll love to
> have a suggestion on how to fix it as I'm not familiar with this part
> of the code.
>
>  {{{
>  def simple_app(environ, start_response):
>     """Simplest possible application object"""
>     status = '401'
>     response_headers = [('Content-type','text/plain')]
>     start_response(status, response_headers)
>     return ['Hello world!\n']
>
>  class RootController(BaseController):
>     error = ErrorController()
>     hg = WSGIAppController(simple_app)
>  }}}
>
>  The error is being handled by TG's ErrorController, if I delete that line
>  it's dropping to pylon's error controller.
>
>  Therefore I believe somewhere in the TG stack this is not being delegated
>  to repoze.who, which it should.

Hmm, I think this might be the StatusCodeRedirect trapping it, try 
configuring an app like this see what happens:

app_config.handle_status_codes = [404]

That is,  "removing" the 401 and 403 it handles by default as specified 
here:

http://trac.turbogears.org/browser/trunk/tg/configuration.py#L142

Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to