Base64 Conversion was Re: [Seaside] VW Seaside problems conti nue

Pennell, David DPennell at quallaby.com
Mon Sep 15 09:49:14 CEST 2003



> -----Original Message-----
> From: Roger Whitney [mailto:whitney at cs.sdsu.edu] 
> Sent: Sunday, September 14, 2003 4:35 PM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: Base64 Conversion was Re: [Seaside] VW Seaside 
> problems continue
> 
> 
> David,
> 	One solution is to use Base64EncodingReadStream of the 
> Base64Encoding 
> package (located in goodies/other/PostgreSQL) We would then get:
> 
> Seaside.WADispachcher>>decodeAuthorization: aString
> 	^(Base64EncodingReadStream on: (aString findTokens: ' 
> ') last) upToEnd 
> asString
> 
> and need to add the package as a prereq. of Seaside. Of course this 
> might make it harder to incorporate changes from the Squeak 
> version of 
> Seaside. So it probably would be better to add a Base64MimeConverter 
> class to aVW-Squeak convertibility section. One could just port the 
> class Base64MimeConverter class from Squeak but it would be less work 
> to do:
> 
> Base64MimeConverter class>>mimeDecodeToChars: aReadStream
> 	^ Base64EncodingReadStream onStream: aReadStream
> 
> And then add:
> 
> Base64EncodingReadStream>>contents
> 	^self upToEnd asString

I was planning to use the Net.Base64StreamEncoder class that is already
included with the VW-WebToolKit port.  Avi is going to change the core
code to displatch through SeasidePlatformSupport>>base64Decode:.
 
> If one also adds the following to the package Seaside/VW-Squeak then 
> one can access via username & password the configuration page.
> 
> SequenceableCollection>>copyAfter: anElement
> 	"Answer a copy of the receiver from after the first occurence
> 	of anElement up to the end. If no such element exists, answer
> 	an empty copy."
> 
> 	^ self allButFirst: (self indexOf: anElement ifAbsent: [^ self 
> copyEmpty])

We have been attempting to minimize the number of Squeak methods that get
dragged into this port.**  Yeah, I know that you can't tell it from looking
at the size of Seaside/Squeak-VW, but we really did eliminate quite a few
things.  Given that there is only one sender of #copyAfter:, I would
probably just change the sender to use something more conventional.

** For at least 2 reasons:  
1) potential license conflicts and 
2) packaging conflicts, at least until somebody volunteers to build and
maintain an independent Squeak-Compatibility package for VW.

> 
> Array>>sortBy: aBlock
> 	^self asSortedCollection: aBlock

The current plan is to change senders of this method to use
#asSortedCollection:



More information about the Seaside mailing list