help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] [patch] Fix static content serving in Swazoo


From: Dmitry Matveev
Subject: [Help-smalltalk] [patch] Fix static content serving in Swazoo
Date: Wed, 2 Feb 2011 22:22:46 +0000

Hello,

I have attached a patch that fixes the static content serving in Swazoo.
The following code demonstrates the case:

| site |
site := Swazoo.SwazooSite newNamed: 'hello'.
site host: '*' ip: '*' port: 8888.
site addResource: (Swazoo.FileResource uriPattern: '/' filePath: 'index.html').
site start.


There were two issues. In Swazoo.FileResponse >> printEntityOn:
aStream we have got MessageNotUnderstood exceptions on
1. rs lineEndTransparent
2. rs nextAvailable: 2000
...and no data were written on the stream.

A dummy #lineEndTransparent message was inserted into a Stream class
in swazoo-httpd/Extensions.st, but in Sport a SpFileStream (that is
used in Swazoo) is derived from Object, not from a Stream.

And then,  a SpFileStream did not provided a #nextAvailable: message,
I have added it.

Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]