[Seaside] Problems using Seaside
Stephen Pair
stephen at pairhome.net
Tue Sep 23 03:37:27 CEST 2003
It seems that this is due to bugs in exception handling (will e.h. ever
work properly?). Here's another version of #beingConversation that is
careful not to do things that seem to trip up exception handling:
----------
HttpAdaptor>>beginConversation
| response request count limit continue gotError |
count := 0.
limit := self maxKeepAliveRequests.
[
gotError := false.
[request := self readRequest] on: Error do: [ :ex | gotError :=
true].
gotError ifTrue: [^self].
[
Bindings clamp:
[response := self dispatchRequest: request.
self addConnectionHeaders: response request: request
count: count.
(self writeResponse: response for: request) ifFalse:
[^self destroy].
self doPostProcessingFor: request response: response].
count := count + 1.
continue := response isPersistent and: [count < limit].
] ifCurtailed: [self destroy].
continue.
] whileTrue.
self destroy.
---------
Note that I saw this in Squeak 3.6 as well. I'll update both 6.1 and
6.2 (coming real soon now) with this version of the #beginConversation.
- Stephen
Juergen Buchner wrote:
>Hi,
>
>I just started playing around with Seaside. My first problem was, that I
>use KomHttp V 6.1, but Avi's tutorial assumes Comanche. Finally, I go
>Seaside running with the following code:
>
>| ma seaside |
>seaside := WAKom default.
>ma := ModuleAssembly core.
>ma serverRoot: FileDirectory default fullName.
>ma alias: '/seaside' to:
> [ma addPlug: [:request | seaside process: request]].
>ma documentRoot: FileDirectory default fullName.
>ma directoryIndex: 'index.html index.htm'.
>ma serveFiles.
>(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule
>
>This code comes with the README of KomHttp, but with "WAKom new" (what
>not works) instead of "WAKom default".
>
>After doing that code, I can start http://localhost:8080/seaside/config"
>and play around with the examples. But when I try to configure my first
>application I get the following error:
>
>--------------
>
>BlockCannotReturn: Block cannot return
>11 September 2003 10:27 pm
>
>VM: unix - Squeak3.4 of 1 March 2003 [latest update: #5170]
>Image: Squeak3.4 [latest update: #5170]
>
>BlockContext>>cannotReturn:
> Receiver: [] in HttpAdaptor>>beginConversation
> Arguments and temporary variables:
> result: a HttpAdaptor
> ex: a BlockCannotReturn
> newResult: nil
> Receiver's instance variables:
> sender: Error(Exception)>>handlerAction
> pc: 82
> stackp: 1
> nargs: 1
> startpc: 78
> home: HttpAdaptor>>beginConversation
>
>[] in HttpAdaptor>>beginConversation
> Arguments and temporary variables:
> response: a HttpResponse
> request: HttpRequest (URL=/seaside/config; protocol=HTTP/1.1;
>header=a Dictiona...etc...
> count: 3
> limit: 100
> ex: an Error
>
>Error(Exception)>>handlerAction
> Receiver: an Error
> Arguments and temporary variables:
> na: 1
> handler: [] in HttpAdaptor>>beginConversation
> returnValue: nil
> Receiver's instance variables:
> messageText: 'getData timeout'
> initialContext: Socket(Object)>>error:
> resignalException: nil
> handlerContext: BlockContext>>on:do:
> tag: nil
> activeHandler: nil
>
>Error(Exception)>>signal
> Receiver: an Error
> Arguments and temporary variables:
> result: nil
> Receiver's instance variables:
> messageText: 'getData timeout'
> initialContext: Socket(Object)>>error:
> resignalException: nil
> handlerContext: BlockContext>>on:do:
> tag: nil
> activeHandler: nil
>
>
>--- The full stack ---
>BlockContext>>cannotReturn:
>[] in HttpAdaptor>>beginConversation
>Error(Exception)>>handlerAction
>Error(Exception)>>signal
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>Error(Exception)>>signal:
>Socket(Object)>>error:
>Socket>>getData:buffer:
>SocketStream>>pvtGetData
>[] in SocketStream>>upToAll:
>BlockContext>>repeat
>SocketStream>>upToAll:
>HttpRequest>>readRequestHeaderFrom:
>HttpRequest>>initializeFromStream:
>HttpRequest class>>readFromStream:
>HttpAdaptor>>readRequest
>[] in HttpAdaptor>>beginConversation
>BlockContext>>on:do:
>HttpAdaptor>>beginConversation
>
>------------------------
>
>What is the reason for that error?
>
>Kind regards
>
>Jürgen
>_______________________________________________
>Seaside mailing list
>Seaside at lists.squeakfoundation.org
>http://lists.squeakfoundation.org/listinfo/seaside
>
>
More information about the Seaside
mailing list