Well this has all been a good education to me about how cookies work.
I had not previously thought too hard about cookies, but just imagined
that somehow the website communicated with the browser behind the
scenes to get the cookie content when it needed it. From the responses
and a little exploring I now realise that when the browser sends a url
request to a website, it sends the contents of all the cookies
associated with that website along with the request. Clearly as this
happens on every url request it is expensive. However it is
completely secure. If there were behind the scenes communication it
could be spoofed. So in answer to one of my original questions there
is no way that a redirect(some website) done from within web2py code
cannot be the same as 'some website' being input in the users browser
because the users browser version will include the cookie for the
website. From the web2py code there is absolutely no way that the
cookie for 'some website' can be retrieved.

Thanks for all the input on this.

Peter



On Dec 14, 8:31 am, pbreit <[email protected]> wrote:
> So test() is going to have to grab the cookie and then include it with the
> urlopen().
>
> Seems kind of weird.

Reply via email to