[Seaside] ZnZincStaticServerAdaptor and debug
Sven Van Caekenberghe
sven at stfx.eu
Wed Apr 9 21:52:14 UTC 2014
On 09 Apr 2014, at 16:59, François Stephany <tulipe.moutarde at gmail.com> wrote:
> I've started to use ZnZincStaticServerAdaptor but I can't get the behavior I want.
>
> When using
>
> > ZnZincStaticServerAdaptor startOn: 8080 andServeFilesFrom: (FileLocator imageDirectory / 'assets').
> > ZnZincStaticServerAdaptor default server debugMode: true.
>
> I have a super simple root component that renders fine.
>
> But if I call a non existent method I get a 404 'Not Found'.
>
> ZnSeasideServerAdaptorDelegate>handleRequest: znRequest
> | response |
> response := self adaptor process: znRequest.
> ^ (response isError and: [ response isAuthenticationRequired not ])
> ifTrue: [ self staticDelegate handleRequest: znRequest ]
> ifFalse: [ response ].
>
> That explains the behavior. Is there a way to set a debugMode that does not trigger the fallback to the staticDelegate if the adaptor returns an error ? (opening a debugger would be great).
ZnZincStaticServerAdaptor is really a hack as the #handleRequest: code clearly shows. I would suggest you make your own subclass that does what you want.
I have never used ZnZincStaticServerAdaptor in practice. Right now I am very happy using standard Seaside FileLibraries during development and moving them to the filesystem during deploy (using, well, #deployFiles), with nginx in front handling them statically.
Having a massive amount of static resources could be a counter indication.
> Cheers,
> Francois
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list