[Seaside] HttpResponse status (GlareUI)

Philippe Marschall philippe.marschall at gmail.com
Sat Sep 5 09:56:56 UTC 2009


2009/9/4 Andrés Garagiola <andresgaragiola at gmail.com>:
> 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

That's OpenTalk / VW related, right?

Cheers
Philippe


More information about the seaside mailing list