Currently, the validate decorator always return 200 OK when validation
fails. I think 400 Bad Request is more appropriate here, so that it
will be easier for non-browser application to interact with the pylons
app. Maybe we can add a parameter to @validate that is defaulted to
200, to make it backward compatible.

The implication from the change is that we also need to remove 400
from the StatusCodeRedirect middleware. On a related note, the
following bits of code (from 0.9.7 beta5) seems to be inconsistent
with the comment:

        # Display error documents for 401, 403, 404 status codes (and
        # 500 when debug is disabled)
        if asbool(config['debug']):
            app = StatusCodeRedirect(app)
        else:
            app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])

Regards,
Yap

--~--~---------~--~----~------------~-------~--~----~
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