Nice to hear from you after a long time :)
Cookie mgmnt is not a Swazoo duty, it only provides all infrastructure
for it. You set a cookie by properly constructing a HTTPResponse.
Example from Aida:
AIDASite answerTo: aRequest
response := Swazoo.HTTPResponse ok.
response entity: <your html response>.
session cookie ifFalse: [response cookie: (self cookieHeaderFor: session)].
AIDASite cookieHeaderFor: aSession
"set a permanent cookie on client (up to year 2010, enough?) "
"for secure sessions different id as for usual ! "
| id |
id := aSession lastRequest isEncrypted
ifTrue: [aSession secureId]
ifFalse: [aSession id].
^(WriteStream on: String new)
nextPutAll: self cookieName;
nextPutAll: id printString;
nextPutAll: '; path=/; expires=Friday, 01-Jan-2010 01:00:00 GMT';
In Aida I extended HTTPRequest with a method:
"return session id from our cookie. nil if not aida field present in
| stream part |
stream := self cookie readStream.
[stream atEnd] whileFalse:
[part := stream upTo: $; .
('aida9357*' match: part) ifTrue:
[^part readStream upTo: $=; upToEnd] ].
.. but event that hadn't been nessesary.
Lukas Renggli wrote:
>> sorry stef, I had to deal with some cookie bug from
> Did you fix it and publish it on swazoo.This is important to report
> this kind of bug to janko. Jankoi how do we proceed? should david
> send you the fix?
Already a long time ago, I decided not to support cookies in SmallWiki
anymore. Still there are probably some deprecated messages dealing
with that, but I suggest not to cookies as they are generally not
worth the troubles. Therefor I suspect that the "cookie-bug" isn't a
problem with Swazoo but with SmallWiki ...