Ian Bicking wrote: > Huy wrote: > > Hi, > > > > Can anyone shed some light on this ? Am I doing something wrong ? > > > > Please help. > > > > Huy > >> According to the docs at > >> http://pylonshq.com/docs/0.9.2/form_handling.html I should be able to > >> use h.redirect_to to avoid the form repost problem. > >> > >> However, it doesn't seem to work for me, because on refreshing a form > >> post, I still get prompted to repost the form.
Hi Ian, Thanks for responding. > Well, I can say that someone here had the same problem during training. > It's probably because of the status code used; 303 is the proper > status code for this situation (potentially 302 for HTTP/1.0 clients). > > This routine could also use a heuristic, and see if the request is a > POST and use 303 in that case, or 307(?) otherwise. There doesn't seem > to be any obvious way to control the status code. Thanks for the suggestion. I tried changing my local pylons to raise httpexceptions.HttpSeeOther() (303) rather then a httpexceptions.HttpFound() (302) but on my browser, this still doesn't retrieve the url using another get request. I am running pylons behind apache using mod_scgi if this makes a difference. At the moment I am just going to use a javascript location.replace to do what I want. Thanks, Huy > > -- > Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
