[Twisted-web] _nevow_carryover_

Donovan Preston dp at ulaluma.com
Thu May 12 12:21:04 MDT 2005


On May 12, 2005, at 4:51 AM, Tommi Virtanen wrote:


> Donovan Preston wrote:
>
>> This is used to implement the formless "IHand" when no guard  
>> session  or
>> cookie-based session is present (and it is always used regardless  of
>> whether they are present).
>>
>
> Actually, that's not true. Carryover is used even when we have a
> session.
>

I know. I was just stating a case where appending garbage to some URL  
is impossible to avoid.


>> 2) If the user actually is returning values from the  
>> autocallable,  and
>> is actually looking for the result in the IHand of the next  request:
>> Check to see if there is a guard session. If so, store the  hand  
>> there
>> for the duration of the redirect.
>>


> That won't really work -- I've had multiple browser windows open
> belonging to the same session many times, having just one IHand per
> session just isn't going to work.
>

A very good point, although the chances of two forms being submitted  
simultaneously and one redirected render getting the other redirected  
render's hand is impossibly small. The IHand should only be available  
during the duration of the request which occurs after the browser has  
been redirected from the original post.


>> 3) Finally, if people ARE returning results from autocallables,  
>> AND  ARE
>> NOT using guard AND are still annoyed with _nevow_carryover_, I   
>> have an
>> idea which involves putting the mini-session key in the <form
>> action=""> instead of the redirect. Since users only see the  
>> action  url
>> during the time it takes their browser to redirect, and the   
>> redirected
>> request can pull the mini-session key out of the referrer,  this  
>> would
>> work.
>>
>
> ..you assume referrers work reliably :(
>

In what way do they not work reliably?

In any case, 1), not appending gunk to the URL if an autocallable  
returns None, will probably reduce newbie annoyance significantly and  
shouldn't harm anything. So I will at least do that.

Donovan





More information about the Twisted-web mailing list