New KomHttpServer, KomServices & DynamicBindings versions

Norbert Hartl norbert at hartl.name
Fri Oct 26 07:41:25 UTC 2007


On Wed, 2007-10-24 at 12:34 +0200, Giovanni Corriga wrote:
> Hi all,
> 
> Since yesterday, I've joined Goran as a mantainer of the
> DynamicBindings, KomServices and KomHttpServer packages.
> 
> We've also moved the KomHttpServer packages from Goran's own repository
> to Samir Saidani's KomHttpServer repository on SqueakSource (see
> http://www.squeaksource.com/KomHttpServer.html ). In this new repo
> you'll find new versions of DynamicBindings, KomServices and
> KomHttpServer that integrate various fixes and modifications by me,
> Goran, Philippe, Ron and others.
> 
> I've already released a new version of KomServices on SqueakMap.
> A new version of DynamicBindings will follow as soon as Goran adds me to
> that package (he's at OOPSLA in Vancouver right now).
> A new version of KomHttpServer will land in SqueakMap after some more
> testing of the new package.
> 
> bugs.squeak.org has a new KomHttpServer category in the Squeak packages
> project. All bugs posted to this category will be assigned to me.
> 
> In the next days, I'll come up with a roadmap for future developments of
> the package. Meanwhile, I'll start looking at the already existing bugs.
> 

This is very good news. Do you know right now how encodings will be
handled? Will there be support for 3.8 and 3.9? 

If it isn't on your todo list already please put handling of multipart 
fields onto it. At the moment WAKomEncoded39 converts every response
to utf8 but it doesn't do the reverse on processing multipart fields. 
Dealing with with html forms with and without uploads gives you 
different encodings. I'll attach a file which fixed this for me but I
think there a other solutions which are way better than mine.

regards,

Norbert
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 26 October 2007 at 9:37:31 am'!
WAKomEncoded39 subclass: #WHKomEncoded39
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Whooka-Base'!
!WHKomEncoded39 methodsFor: 'as yet unclassified' stamp: 'noha 5/16/2007 22:45'!
processMultipartFields: aRequest
	aRequest multipartFormFieldsDo:
		[:chunk |
		chunk fileName isEmptyOrNil ifFalse:
			[|stream file|
			stream := WriteStream on: String new.
			chunk saveToStream: stream.
			file := WAFile new
				fileName: chunk fileName;
				contents: stream contents;
				contentType: chunk contentType;
				yourself.
			aRequest postFields at: chunk fieldName put: file]
		ifTrue: [
			|stream|
			stream := WriteStream on: String new.
			chunk saveToStream: stream.
			aRequest postFields at: chunk fieldName put:( (stream contents) convertFromEncoding: #utf8)]
		].! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
WHKomEncoded39 class
	instanceVariableNames: ''!
!WHKomEncoded39 class methodsFor: 'as yet unclassified' stamp: 'noha 4/26/2007 08:15'!
startOn: aPort 
    self stop.
    super startOn: aPort.
    "killing keepAlives prevents proxy errors when uploading files"
    HttpService allInstancesDo: [:each | each keepAlive: false]! !
!WHKomEncoded39 class methodsFor: 'as yet unclassified' stamp: 'noha 4/26/2007 08:15'!
stop
    "Kill all existing HTTP servers"
    super stop.
    HttpService allInstancesDo: [:each | 
        each stop; waitForStop; unregister]! !


More information about the Squeak-dev mailing list