Hi all,

I used to (Pylons 0.9.7rc4 previously) force the response status to
200 in some circumstances (like a request from a flash player since it
can't handle anything but status 200...). I updated to 0.9.7 yesterday
it doesn't work anymore.

response.status_int in ErrorController used to work. But in
StatusCodeRedirect, the status coming from the 2nd call to
call_wsgi_application() (newstatus, coming from ErrorController) is
ignored.

status, headers, app_iter, exc_info = call_wsgi_application(
    self.app, environ, catch_exc_info=True)
if status[:3] in self.errors and \
    'pylons.status_code_redirect' not in environ and self.error_path:
    # Create a response object
    environ['pylons.original_response'] = Response(
        status=status, headerlist=headers, app_iter=app_iter)
    environ['pylons.original_request'] = Request(environ)

    # Create a new environ to avoid touching the original request data
    new_environ = environ.copy()
    new_environ['PATH_INFO'] = self.error_path

    newstatus, headers, app_iter, exc_info = call_wsgi_application(
            self.app, new_environ, catch_exc_info=True)
start_response(status, headers, exc_info)


Is there an "official" way to permit the ErrorController to change the
response status?

Thanks a lot!

Gus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to