Servers
This page describes the changes made in the Seaside server adapter interface. Seaside uses this interface to run on servers like Comanche, Swazoo or OpenTalk. This page is intended mostly for vendors.
Seaside 3.0
In Seaside 3.0 the following changes were made to the server adapter interface:
-
WARequest >> #cookies
is aCollection
of instances ofWARequestCookie
instead of aDictionary
. You can useWARequestCookie fromString:
for parsing. - WACookie has a many more features including HttpOnly. Make sure you support it. For your convenience there are now serialization methods like #oldNetscapeString.
- There is now a test for setting two cookies at once, make sure your implementation supports this and works with all major browsers.
-
WARequest >> #url
is a fully decoded WAUrl object - The remote address is an an opaque string in
WARequest
. You no longer need the#remoteAddress
method in the native request class. -
#handleRequest
takes aWARequestContext
as an argument, no longer aWARequest
. You must set the server adapter in the request context. You should not set up theWACurrentRequestContext
variable. - Also be warned that under strange circumstances
handleRequest:
might returnnil
. There is a functional test for this as all as one that simulates a broken client. You feel appropriate as long as it’s a valid HTTP 500 response. However for security reasons we recommend to not show a stack trace. - Server adaptors that simply use the default dispatcher are suggested to not cache it but instead send WADispatcher default for every request. The method does only a nil check and an instance variable access so there shouldn’t be any measurable performance penalties.
-
WAServer
was renamed toWAServerAdaptor
for clarity. It has been changed to ensure all behaviour is on the instance-side of the class. This will facilitate having multiple Seaside instances running on different ports, and so on. All server adaptors should subclassWAServerAdaptor
to ensure they share the correct behaviours and can take advantage of new Seaside tools that in in development to facilitate managing instances.
You can have a look at the Kom and Swazoo 2 implementations as a reference. Note, however, that the Swazoo adaptor has not yet been updated to subclass WAServerAdaptor
(it has been updated to reflect all other items on this page).