durusmail: quixote-users: wierd TypeError caused by http_request.get_header
wierd TypeError caused by http_request.get_header
2004-08-28
2004-08-28
2004-08-30
2004-08-30
2004-08-30
Setting cookies while redirecting
2004-08-31
2004-08-31
2004-08-31
2004-08-31
2004-08-31
2004-08-31
2004-09-01
2004-09-03
2004-09-06
2004-09-06
2004-09-06
2004-08-31
wierd TypeError caused by http_request.get_header
Jason Sibre
2004-08-30
Whoops, it was the first suspect, which for some reason I talked myself out
of.

You're using an htmltext instance as a key, rather than a string.  They
aren't subscriptable, and it needs to be, in order for the lookup of
'referer' to succeed.  It isn't really in the dict, it just let's you think
it is by converting it to the 'HTML_REFERER' that might be in the dict.

try this in your ptl based [html] functions instead:

request.get_header(str('referer'))

and you'll get the right result.

Jason


> But the error is actually caused by request.get_header('referer'), it
> was there even if i removed the redirect statement
>
> According to the doc string,  request.get_header('referer') is equal
> to request.get_header('HTTP_REFERER')
>



reply