[Seaside] Re: Magritte + Comet problem?

Lukas Renggli renggli at gmail.com
Fri Jun 5 15:13:48 UTC 2009


A Monticello file would be much simpler to merge, but a change-set is fine too.

What I need to know is the Monticello version the code is based on, I
am pretty sure that it changed in the meantime.

Cheers,
Lukas


On Fri, Jun 5, 2009 at 4:57 PM, John
Chludzinski<john.chludzinski at gmail.com> wrote:
> Will a change-set do?  ---John
>
> On Wed, Jun 3, 2009 at 6:33 PM, John
> Chludzinski<john.chludzinski at gmail.com> wrote:
>> The problem occurred when I tried to use MAFileDescription from
>> Magritte.  When I tried to 'upload' a file I had selected, I got an
>> error in my Opera browser.  After some investigation I found that the
>> 'fields' instance variable in WARequest was an empty Dictionary.
>> Hence, the changes in the class WAListener.  ---John
>>
>>
>> On Wed, Jun 3, 2009 at 3:18 PM, John Chludzinski
>> <john.chludzinski at gmail.com> wrote:
>>> To use Comet I use:
>>>
>>>      WAListener startOn: 8080.
>>>
>>> But it appears that Magritte doesn't work with WAListener.  To get it
>>> to work Bob Arning & I made mods to WAListener (let me know anyone if
>>> this is problematic?):
>>>
>>> !WAListener methodsFor: 'private' stamp: 'raa 6/3/2009 14:42'!
>>> convertFileName: aString
>>>        ^aString! !
>>>
>>> !WAListener methodsFor: 'private' stamp: 'raa 6/3/2009 14:42'!
>>> convertRequest: aKomRequest
>>>        | request |
>>>
>>>        self processMultipartFields: aKomRequest.
>>>
>>>        request := WARequest
>>>                method: aKomRequest method
>>>                url: aKomRequest url unescapePercents
>>>                headers: aKomRequest header
>>>                fields: (self fieldsOf: aKomRequest)
>>>                cookies: aKomRequest cookies
>>>                nativeRequest: aKomRequest.
>>>
>>>        aKomRequest method = 'PUT'
>>>                ifTrue: [request fields
>>>                                        at: 'PUTData'
>>>                                        put: (aKomRequest stream next: aKomRequest contentLength)].
>>>        ^ request! !
>>>
>>> !WAListener methodsFor: 'as yet unclassified' stamp: 'raa 6/3/2009 14:42'!
>>> convertMultipartFileField: aChunk
>>>
>>>        ^(WAFile fromChunk: aChunk)
>>>                fileName: (self convertFileName: aChunk fileName);
>>>                contentType: aChunk contentType
>>>                yourself! !
>>>
>>> !WAListener methodsFor: 'as yet unclassified' stamp: 'raa 6/3/2009 14:42'!
>>> processMultipartFields: aRequest
>>>
>>>        aRequest multipartFormFieldsDo: [ :chunk |
>>>                | contents fieldName previousValue |
>>>                fieldName := chunk fieldName.
>>>                contents := chunk fileName isEmptyOrNil
>>>                        ifTrue: [
>>>                                String streamContents: [ :stream |
>>>                                        chunk saveToStream: stream ] ]
>>>                        ifFalse: [ self convertMultipartFileField: chunk ].
>>>                previousValue := aRequest postFields at: fieldName ifAbsent: [ nil ].
>>>                previousValue isNil
>>>                        ifTrue: [  aRequest postFields at: fieldName put: contents ]
>>>                        ifFalse: [
>>>                                (previousValue isKindOf: self collectionClass)
>>>                                        ifTrue: [ previousValue add: contents ]
>>>                                        ifFalse: [ aRequest postFields at: fieldName put: (self
>>> collectionClass with: previousValue with: contents) ] ] ]! !
>>>
>>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list