On 8/23/08, Alex wrote:
>
>  Beside, forcing browser to show its standard error
>  page for 400 error code when user simply made a mistake entering e-
>  mail address or phone number is the straightest way to scare your
>  users to death.
>

No, on modern browsers, your form validation error page will still be
displayed. I have only tested with Opera and Firefox, but even IE6 can
do it if your page is larger than half a kb [1]

On 8/23/08, Cliff wrote:
>
>  If a form is missing a field, your server still understood (and could
>  process) the request, it's your application that refuses the request
>  because of its own requirements that are completely separate from the
>  requirements of the HTTP server.
>

When my app cannot locate a resource, it returns a 404.
When my app cannot recognize the user, it returns a 401.
When my app doesn't like the user, it returns a 403.
When my app thinks a request is broken, it returns a 400.
My app is the HTTP server.

By the way, Django has a rest plugin that is hardcoded to return 400
on form validation failures [2]. Struts has a rest plugin that by
default returns 400 on form validation failures [3]. Pylons already
has a wonderful rest controller. I am merely suggesting to add a
parameter to @validate that is defaulted to 200.

Regards,
Yap

[1] http://support.microsoft.com/kb/q218155/
[2] http://code.google.com/p/django-rest-interface/
[3] http://struts.apache.org/2.x/docs/rest-plugin.html

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