request.env.http_referer is not working for me.
I checked (http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z14) and the
referer is optionally set by the client. So we can not take it for granted.

Miguel

On Mon, May 3, 2010 at 10:45 PM, mr.freeze <nat...@freezable.com> wrote:

> I'm not sure if it's reliable or safe but request.env.http_referer
> might be what you're looking for.
>
> On May 3, 4:39 pm, Miguel Lopes <mig.e.lo...@gmail.com> wrote:
> > Is there a way to find the previous location / address in an action?
> >
> > For example:
> > Currently inwww.domain.com/a/c/f/arg1
> > Follow some link to action_x
> >
> > def action_x:
> >   if something_is_wrong:
> >     redirect(request.last_location) # including args
> >   ...
> >
> > My goal is to send the user to the page is comming from in case he calls
> an
> > action with a incorrect or the wrong parameters.
> >
> > Txs,
> > Miguel
>

Reply via email to