[Seaside] config page questions

Avi Bryant avi.bryant at gmail.com
Fri Jan 13 10:51:57 CET 2006


On Jan 12, 2006, at 8:56 AM, Blanchard, Todd wrote:

> While we are discussing the config page/app, I thought I'd share a  
> little annoyance.
>
> Many urls in seaside for links/form posts/etc are generated as  
> absolute urls.  This means moving an image to another machine is  
> virtually impossible if you've set the server name in the config app.
>
> Was this a conscious choice?  Having all the urls be relative would  
> make things a lot nicer WRT deploying the same image to multiple  
> machines.

I'm a little bit confused; if you're ok with them being relative, why  
set the server name at all?  That option is there precisely for the  
case where you want to force Seaside to produce specific absolute  
URLs (for example, because something is choking on relative URLs in  
the Location: header of a 302 response, which is technically not  
proper HTTP).

I do tend to use absolute URLs in my deployments because I've been  
bitten enough times by problems from keeping them relative, but I  
have to admit that it's a bit cargo cultish by now - I couldn't tell  
you without actually trying exactly where the problems lie.  One  
thing that I did do recently is have Seaside grab the server name and  
port automatically from the HOST header if they're not explicitly  
set.  If you're either running Comanche directly on port 80, or have  
your proxy configured to pass through the HOST header unchanged  
(ProxyPreserveHost in Apache 2.0), then this will give you correct  
absolute URLs without any manual configuration.

Avi


More information about the Seaside mailing list