[Seaside] url rewrite (http 304) with seaside / pharo 3

Johan Brichau johan at inceptive.be
Wed Sep 10 06:59:43 UTC 2014


Hi,

You can take a look at the implementation of the #testRedirectTo method in the Core tests.
The WAResponse object has methods you will want to use: #redirectTo: , #movedPermanently, etc...
When you find senders of these methods, you can see how to make a redirection response. Something along the lines of:

self requestContext respond: [:response | response movedPermanently; redirectTo: url]

I think this should work in the #initialRequest: method as well, but let me know if it does not.

Johan

On 10 Sep 2014, at 00:43, nova <ant11.nova70 at gmx.de> wrote:

> Hi,
> 
> I an new to seaside and playing with it. When a session is started I
> want to make a url check and if it fits some conditions to do an url
> rewrite (http 304).
> 
> I think I found the place where to make this check: initialRequest:
> But I can't find how to send a url rewrite back (I don't want to use an
> external http-server for that rewrite).
> 
> Any help will be appreciated :)
> 
> P.
> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list