What I'm saying is that most frameworks (that I have used) use 302 as
the default redirect code NOT 301.

> redirect(url, status='301 Moved Permanently') : Returns a status redirect to 
> the new URL. url is joined with the base URL > so that things like 
> redirect("about") will work properly.

If you use 301 then the browser will NOT go back to the page you want
to look at, it is PERMANTLY redirected to the new resource.  And this
is what happens in Firefox when you do send back a 301.  It will not
go back to the page you redirected from.  And it is PERMANENT.  FF
will not ask for the old page even after a restart of the browser.

My point is that this behavior may confuse people who use any other
framework and then use web.py.  A 301 Use Case is (relatively) rare
versus a 302/303 which should be very common (ex: form processing).

So no magic just default to code 302 instead of 301.

References:
http://msdn2.microsoft.com/en-us/library/ms524309.aspx
http://api.rubyonrails.org/classes/ActionController/Base.html#M000447

Regards

On Dec 16, 11:56 am, "Aaron Swartz" <[EMAIL PROTECTED]> wrote:
> > I'm not sure what you're suggesting.  I did you web.seeother but it
> > does not work correctly in Firefox.  Firefox will attempt to re-post
> > the form.
>
> > Steps to repeat:
> > 1.  Create a page with form on it.
> > 2.  Post with the form, process it and the redirect using web.seeother
> > 3.  Now with the new page simply refresh the browser (Firefox) and you
> > will get a warning about re-posting the variables.
>
> > What I'm suggesting is a change to the API to make it work as expected
> > (as expected by anyone whose used another web framework that is).
>
> How are you supposed to do that? You wanted it to send a 302; seeother
> sends a 302, you say that doesn't work in Firefox. Do other frameworks
> do something magic to allow for 302s and no reposting?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to