I will take this patch!

On Jun 13, 6:19 am, Alexey Nezhdanov <snak...@gmail.com> wrote:
> I'm writing unit tests for my app and come across this problem:
> if I try to access the page which has @auth.requires_login()
> I get error 303 - i.e. redirect to the page with login/password form.
> While this works visually for browsers, it is actually wrong for testing AND
> for search engines. Status codes are important for robots and here status is
> set incorrectly (should be 401).
> So why we not set this to 401 and make redirect with other means
> (javascript/meta tags)? We know that pages that are larger than certain size
> are displayed ok in IE so this should not be a problem.
> Here is sample page with redirect:
>
> """<html>
>     <head>
>         <meta http-equiv="expires" content="0" />
>         <meta http-equiv="refresh" content="0;url=%(nexturl)s/" />
>         <script type="text/javascript"><!--
>           window.location='%(nexturl)s';
>           // --></script>
>     </head>
>     <body />
> </html>
> """%{'nexturl':URL(r=request,c='auth',f='login')}
>
> If this is a good idea - I'll write a patch.
>
> --
> Sincerely yours
> Alexey Nezhdanov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to