[Zope] RE: RE: [Zope] Q: howto change HTTP_REFERER

a.wacknitz@francotyp.com a.wacknitz@francotyp.com
Wed, 17 May 2000 15:31:45 +0200


> > I want to change the value of HTTP_REFERER for a response.
> > The Zope Quick Reference states that there is a method "set" 
> > to change a
> > value of a variable for the RESPONSE object. But <dtml-call
> > "RESPONSE.set('HTTP_REFERER', HTTP_REFERER)"> gives an AttributeError.
> > BTW: I am doing this in order to redirect a response to the 
> > second last
> > HTTP_REFERER as I have moved most of my methods to a folder 
> > beneath the top
> > folder. Maybe there is a better way to do this?
> 
> I'm not sure I'm following you - the referer is generated
> and sent in by the _client_ in the REQUEST. You could, I
> guess, change it in the request object, but it would have
> no effect on the client - there is no way to influence 
> directly what the client sends as referer.
Ok, I see the point. But how can I return to the second last page with a
RESPONSE.redirect?
If I use <dtml-call "RESPONSE.redirect(HTTP_REFERER)"> a call will be
redirected to my calling form. E.g. I want to have management screens for
the users with that they can add instances of things. I have put the forms
that will be used to get necessary information in a subfolder, say /Forms
and ZSQL Methods in another subfolder /SQL. So this will result in the
following calling sequence:
.../frmAManagementScreen -> /Forms/frmAddNewUser -> /SQL/sqlAddUser
After adding a user by /SQL/sqlAddUser I want to return to
.../frmAManagementScreen and NOT to /Forms/frmAddNewUser. But a <dtml-call
"RESPONSE.redirect(HTTP_REFERER)"> in /SQL/sqlAddUser (which is the last in
the calling sequence) will return to /Forms/frmAddUser.
(.../frmAManagementScreen can have an arbitrary location within my
hierarchy.)

I am looking for an (elegant) way to do this.

Andreas
**********************************************************************
This email message has been swept by MIMEsweeper for the presence of
computer viruses.

Francotyp-Postalia AG & Co.