[Seaside] HttpResponse status (GlareUI)

Andrés Garagiola andresgaragiola at gmail.com
Fri Sep 4 19:39:57 UTC 2009


Hi list,

I found a  bug, i don´t know if it´s fixed is other versions, using a Flex
client (GlareUI) with seaside 7.6.
The browser IE not understand the HttpResponse reply. Monitoring the http
traffic i found '200' in the http response package and the client wait for
200 without simple quotations.
Change #printString by #asString on #asHttpResponse method (Class
WAResponse) the problem was resolved.

*asHttpResponse: anHttpResponse*

    | source |
    anHttpResponse statusLine: (Net.HttpResponseStatusLine code: self status
printString).

    self headers associationsDo: [ :eachHeader |
        anHttpResponse addField: (Net.HeaderField
                                    readFrom: (self fieldSourceFor:
eachHeader)
                                    acceptNonAsciiCharacters: true) ].

    self cookies do: [ :eachCookie || cookieValue |
        cookieValue := Net.SetCookieValue netscapeStyleName: eachCookie key
value: (eachCookie value ifNil: [ '' ]).
        eachCookie expiry ifNotNil: [ cookieValue expires: eachCookie expiry
asLocal ].
        eachCookie path ifNotNil: [ :path | cookieValue path: path ].
        anHttpResponse addField: (Net.SetCookieField add: (OrderedCollection
with: cookieValue))].

    anHttpResponse addField: (Net.HeaderField readFrom: ('content-type: ',
contentType) readStream).
    source := self contents.
    source isByteStream
        ifTrue: [ anHttpResponse body byteSource: source ]
        ifFalse: [ anHttpResponse body source: source ].
    ^anHttpResponse
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090904/99e0e4bd/attachment.htm


More information about the seaside mailing list