[Cuis-dev] still looking for a good web server library

Mark Volkmann r.mark.volkmann at gmail.com
Fri Jun 14 11:26:49 PDT 2024


I've been trying WebClient which I installed with

Feature require: 'WebClient'

I've had some success with it, but it seems to be missing key features such
as serving static files. Here's an example of configuring that:

server := WebServer new listenOn: 3000.
server addService: '/public' action:[:req| WebServer browseRequest: req].

This looks for files in the Cuis-Smalltalk-Dev-UserFiles/public directory.
But #browseRequest: sends #browseFile:request: which does not determine the
MIME type from the extension of the requested file. For example, if the
extension is ".html" then I think the MIME type should be "text/html".
Instead it uses "application/octet-stream" for every file which results in
the file being downloaded rather than rendered in the web browser.

Should I be looking at a different package that is perhaps more mature? Is
it possible there isn't a good package for implementing a web server that
is compatible with Cuis Smalltalk?

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240614/3635878f/attachment-0001.htm>


More information about the Cuis-dev mailing list