Base64 Conversion was Re: [Seaside] VW Seaside problems continue

Roger Whitney whitney at cs.sdsu.edu
Sun Sep 14 14:35:16 CEST 2003


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

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])

Array>>sortBy: aBlock
	^self asSortedCollection: aBlock

On Thursday, September 11, 2003, at 02:26  PM, Pennell, David wrote:

>> I enter the username and password I just created in the web
>> browser and
>> an exception is raised. The method
>> Seaside.WADispachcher>>decodeAuthorization: uses (see below)
>> the class
>> Base64MimeConverter, which is not in my image.  So an exception is
>> raised when Seaside tries to decode the username and password it was
>> sent. Does anyone know where to find this class?
>>
>> Seaside.WADispachcher>>decodeAuthorization: aString
>> 	^(Base64MimeConverter mimeDecodeToChars:
>> 		(ReadStream on: (aString findTokens: ' ') last))
>> 			contents
>
> Mea culpa.  That one is still on the to-do list.  I haven't used the
> configuration application or authentication so it hasn't bothered me.
> As to Base64MimeConverter, I need to do a little research on it before
> deciding what to do.

----
Roger Whitney              Department of Computer Science
whitney at cs.sdsu.edu        San Diego State University
http://www.eli.sdsu.edu/   San Diego, CA 92182-7720
(619) 583-1978
(619) 594-3535 (office)
(619) 594-6746 (fax)



More information about the Seaside mailing list