[albatross-users] problems with a RandomModularSessionApp

Tommy !! the_edge2020 at hotmail.com
Mon Apr 14 02:57:53 EST 2003


Argh ... indentation of the code went screwy. You get the idea anyway.

Tom L






>From: "Tommy !!" <the_edge2020 at hotmail.com>
>To: albatross-users at object-craft.com.au, chironsw at swbell.net
>Subject: Re: [albatross-users] problems with a RandomModularSessionApp
>Date: Mon, 14 Apr 2003 02:54:07 +1000
>MIME-Version: 1.0
>X-Originating-IP: [203.221.71.164]
>X-Originating-Email: [the_edge2020 at hotmail.com]
>Received: from mail.object-craft.com.au ([210.23.136.24]) by 
>mc7-f37.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sun, 13 Apr 
>2003 09:55:04 -0700
>Received: from numbat.object-craft.com.au (localhost [127.0.0.1])by 
>mail.object-craft.com.au (Postfix) with ESMTPid 9535D16DD8; Mon, 14 Apr 
>2003 02:55:02 +1000 (EST)
>Received: from hotmail.com (f10.sea2.hotmail.com [207.68.165.10])by 
>mail.object-craft.com.au (Postfix) with ESMTP id 9A54116DD4for 
><albatross-users at object-craft.com.au>; Mon, 14 Apr 2003 02:54:10 +1000 
>(EST)
>Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; 
>Sun, 13 Apr 2003 09:54:08 -0700
>Received: from 203.221.71.164 by sea2fd.sea2.hotmail.msn.com with HTTP;Sun, 
>13 Apr 2003 16:54:07 GMT
>X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP
>Delivered-To: albatross-users at object-craft.com.au
>Message-ID: <F10r6n3YXNCiPjOo7RO00047feb at hotmail.com>
>X-OriginalArrivalTime: 13 Apr 2003 16:54:08.0253 (UTC) 
>FILETIME=[4CB052D0:01C301DD]
>Sender: albatross-users-admin at object-craft.com.au
>Errors-To: albatross-users-admin at object-craft.com.au
>X-BeenThere: albatross-users at object-craft.com.au
>X-Mailman-Version: 2.0.11
>Precedence: bulk
>List-Unsubscribe: 
><https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users>,<mailto:albatross-users-request at object-craft.com.au?subject=unsubscribe>
>List-Id: Albatross User's List <albatross-users.object-craft.com.au>
>List-Post: <mailto:albatross-users at object-craft.com.au>
>List-Help: 
><mailto:albatross-users-request at object-craft.com.au?subject=help>
>List-Subscribe: 
><https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users>,<mailto:albatross-users-request at object-craft.com.au?subject=subscribe>
>List-Archive: <https://www.object-craft.com.au/pipermail/albatross-users/>
>Return-Path: albatross-users-admin at object-craft.com.au
>
>Hi again Greg,
>
>Excuse the delay in posting this, life's tough when you're a student :P
>
>I'll continue on with the bugs I've discovered and fixed ...
>
>As a refresher, for anyone who missed my last post, there is a nasty bug in 
>apacheapp.py. Simple little typo, really. But it's nasty enough to stop 
>your program cold when using mod_python with albatross, as poor old Greg 
>found out.
>
>The fix is as follows:
>
>replace line 34 with the following:
>
>        return self.__req.server.server_hostname
>
>And the new stuff, which you will almost certainly encounter with 
>SessionFileApp-style applications:
>
>In sessionfile.py, you may encounter problems when your session is first 
>created due to a KeyError being raised in 
>SessionFileContextMixin._get_sesid_from_cookie. The reason being that it 
>tries to grab the session ID from the cookie (as the method name implies) - 
>the thing is, the cookie hasn't been set when it's called.
>
>Thus, the line 'return os.path.basename( c[self.app.ses_appid()].value )' 
>throws a KeyError since the SimpleCookie c does not have the cookie set 
>just yet since the session has just started. Ouch.
>
>There's a few ways to fix this. All work to the same effect, however, so 
>I'll present the simplest:
>
># BEGIN FIXED CODE, LINE 36, sessionfile.py
>
>try:
>  return os.path.basename( c[self.app.ses_appid()].value )
>except OSError:
>  pass
>#
># FIX: catch a KeyError exception that may be thrown in the try
># clause.
>#
>except KeyError:
>  pass
>
>return None
>
># END FIXED CODE
>
>And there you have it. Little problems like this are here and there in 
>Albatross.
>
>Strangely, I still haven't heard back from the object-craft team regarding 
>the initial bug you mentioned. Oh well.
>
>Take it easy, I'll post more bugs as I/if I find them.
>
>Kind regards,
>Tom L
>
>
>
>
>
>
>>From: Chiron Consulting <chironsw at swbell.net>
>>To: Tommy !! <the_edge2020 at hotmail.com>
>>Subject: Re: [albatross-users] problems with a RandomModularSessionApp
>>Date: Thu, 10 Apr 2003 13:33:03 +0000
>>MIME-Version: 1.0
>>Received: from mta5.snfc21.pbi.net ([206.13.28.241]) by 
>>mc5-f32.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 10 
>>Apr 2003 13:42:16 -0700
>>Received: from swbell.net ([208.191.179.211]) by mta5.snfc21.pbi.net 
>>(iPlanet Messaging Server 5.1 HotFix 1.6 (built Oct 18 2002)) with ESMTP 
>>id <0HD500INI4YB4J at mta5.snfc21.pbi.net> for the_edge2020 at hotmail.com; Thu, 
>>10 Apr 2003 11:34:59 -0700 (PDT)
>>X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP
>>Message-id: <3E95728F.40108 at swbell.net>
>>X-Accept-Language: en-us, en
>>User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) 
>>Gecko/20020529
>>References: <F58Kr4qjpQEJhKiiB3D00012767 at hotmail.com>
>>Return-Path: chironsw at swbell.net
>>X-OriginalArrivalTime: 10 Apr 2003 20:42:16.0648 (UTC) 
>>FILETIME=[AC5E6480:01C2FFA1]
>>
>>
>>>To fix it simply replace the line (in apacheapp.py -> you'll have to get 
>>>your hands dirty with the albatross source code):
>>>
>>>self.__req.connection.server.server_hostname
>>>
>>>with:
>>>
>>>self.__req.server.server_hostname
>>
>>Great.  That did it.
>>
>>>You will find a few other small bugs are also present. More on that 
>>>later...
>> > All the bugs I've come across so far can be resolved with small
>> > edits of the albatross source code.
>>
>>Please post them at your earliest convenience, the sooner the better. Any 
>>fixes you can post are things I won't have to find and fix for myself.  
>>Unless you can get the object-craft people to integrate them and release a 
>>new minor version.
>>
>>>Long live OSS, eh?
>>
>>Eh, indeed! Thanks loads.
>>
>>--
>>Greg Goodman
>>Chiron Consulting
>>
>
>
>_________________________________________________________________
>MSN Instant Messenger now available on Australian mobile phones. Go to  
>http://ninemsn.com.au/mobilecentral/hotmail_messenger.asp
>
>_______________________________________________
>Albatross-users mailing list
>Albatross-users at object-craft.com.au
>https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users


_________________________________________________________________
Hotmail now available on Australian mobile phones. Go to  
http://ninemsn.com.au/mobilecentral/hotmail_mobile.asp




More information about the Albatross-users mailing list