Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2152 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

TurboGears is shallowing up 401 from wsgi apps.

Reported by: jorge.vargas Owned by: Gustavo
Priority: normal Milestone: 2.0
Component: TurboGears Version: trunk
Severity: normal Keywords:
Cc: me@…

Description

Using the following 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.

Change History

comment:1 Changed 10 years ago by Gustavo

  • Cc me@… added

comment:2 Changed 10 years ago by Gustavo

  • Owner changed from faide to Gustavo
  • Status changed from new to assigned

I've had a problem which is closely related to yours, which I've just fixed in [6113]. Can you please try the latest trunk and see if your problem is now solved?

comment:3 Changed 10 years ago by jorge.vargas

  • Status changed from assigned to closed
  • Resolution set to fixed

Hi Gustavo, you are right that fixed my problem too. Thank you for the fix.

Note: See TracTickets for help on using tickets.