[aida] WebSession lastRequest (was Custom request handling howto)
janko.mivsek at eranova.si
Thu Nov 22 01:34:18 CET 2007
Michael Rueger wrote:
>> Last request actually is a request currently processed and not a
>> previous one. Well, method name should obviously be better ...Maybe is a
>> time to rename it? Simply to #currentRequest?
> I figured that that was the intention.
> But, would it be possible:
> if a second request for the same session came in (e.g the user has two
> browser windows open or another ajax request comes in) before the first
> request is completed that this assumption would be no longer valid?
Yes, you are right. And this is happening also when images are loading
What is interesting that so far that was not a problem but it is very
valuable to know, what is happening here. Thanks to pointing that
potential problem out!
What I'll do is to better comment that method, but let the name stay the
Also, this means that #printWebPageFor: aSession is not reliable enough
and that we really need to add an argument aRequest, to be sure which
request we are actually serving in case of multiple requests at once.
So, let the search for a better solution continue!
Update: I just comment #lastRequest method:
"last request served on that session. It is also current one until
response is sent. Note also that multiple requests can be served at
once! In this case last request will be the one one which
last started! "
Smalltalk Web Application Server
More information about the Aida