[Zope] Re: cookie crumbler - preserving variables in URL
Maciek Pasternacki
maciekp at japhy.fnord.org
Tue Aug 31 20:48:03 EDT 2004
On Prickle-Prickle, Bureaucracy 25, 3170 YOLD, Dieter Maurer wrote:
>>>>I have similar problem with traverse_subpath; I have ZPT, say
>>>>http://server/Template, which I call as
>>>>http://server/Template/Something and I read traverse_subpath in the
>>>>template to render wanted output; when Unauthorized is raised,
>>>>CookieCrumbler redirects to http://server/Template.
>>>
>>> CookieCrumber's behaviour is controlled by the "came_from"
>>> variable that you can adjust to your needs in your "login_form".
>>
>>In login_form I receive came_from from CookieCrumbler's Python code
>>and it's set wrong.
>
> But, you can make the corresponding hidden variable right:
>
> In the login form, you still have the original request.
How is it possible? Login form is not displayed instead of called
page under it's URL, but it's /login/login_form?came_from=..., so
there must be some redirection and a new request. Tests with wget
also suggest that login_form doesn't receive original request:
#v+
japhy at lizard:~/z % wget -v --progress= http://www.localhost:8000/Personal
--02:45:42-- http://www.localhost:8000/Personal
=> `Personal'
Resolving www.localhost... 127.0.0.1
Connecting to www.localhost[127.0.0.1]:8000... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.localhost:8000/login/login_form?came_from=http%3A//www.localhost%3A8000/Personal&retry=&disable_cookie_login__=1 [following]
--02:45:42-- http://www.localhost:8000/login/login_form?came_from=http%3A//www.localhost%3A8000/Personal&retry=&disable_cookie_login__=1
=> `login_form?came_from=http:%2F%2Fwww.localhost:8000%2FPersonal&retry=&disable_cookie_login__=1.1'
Connecting to www.localhost[127.0.0.1]:8000... connected.
HTTP request sent, awaiting response... 200 OK
#v-
--
__ Maciek Pasternacki <maciekp at japhy.fnord.org> [ http://japhy.fnord.org/ ]
`| _ |_\ / { ...you claimed all this time that you would die for me,
,|{-}|}| }\/ why then are you so surprised when you hear your own eulogy... }
\/ |____/ ( M. J. Keenan ) -><-
More information about the Zope
mailing list