logo       

Re: config page questions: msg#00159

lang.smalltalk.squeak.seaside

Subject: Re: config page questions


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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise