On Mon, May 3, 2010 at 11:08 PM, Jonathan Lundell <jlund...@pobox.com>wrote:
> web2py probably isn't setting referer on a redirect, and if it did, you'd > have to interpret the URL. No. If I have no redirect and call a location with no args the referer is not set when I arrive at web2py's default "Internal error" page. Which is okay because the standard says referer is optionally set by the client. > How about putting the previous location in session before you redirect? > That works on some instances, but not for controlling for the wrong number or the wrong parameters. A concrete example: 1. Currently in www.domain.com/a/c/f/arg1<http://inwww.domain.com/a/c/f/arg1> 2. User edits address bar and presses enter (removed arg1): www.domain.com/a/c/f/ <http://inwww.domain.com/a/c/f/arg1> 3. The called action: def f(): if not request.args: redirect(request.last_location) # including args Perhaps someone knows of an alternative way to accomplish the same? Miguel