Craeg K Strong wrote:

> I believe HTTP_REFERER will list the place from whence you were redirected,
> but unfortunately it does not distinguish between
> 
>  "redirect"  and
> 
> "following HTML link"
> 
> Of which my application has many :-(


Ok, then here are two other ideas:

1. in your redirect to an acquired method which itself redirects back to 
the document, this creates a HTTP_REFERER header which will tell you 
that it - via this method - came from your application:

raise 'Redirect',newURL+'/I_am_just_here_to_show_the_special_redirect'

where 'I_am_just_here_to_show_the_special_redirect'

is a python script which just does
context.REQUEST.RESPONSE.redirect(context.absolute_url())

I don't know ATM if you need perhaps context.aq_parent.absolute_url().

Now inspect HTTP_REFERER.split('/')[-1].

But note that HTTP_REFERER is not secure, because it's sent by the 
client, and some privacy tools/proxies might suppress it.

2. use cookies, which have their own problems.

Or, use both methods.

cheers,
olive






_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to