[plt-scheme] web-server: base address of error pages

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sun May 15 18:20:08 EDT 2005

I can't find any documentation that claims it should do something
different, so this is potentially a feature.

There seems to be 3 options:
1. Base url for errors* is where the error occurs. (This would allow,
for example, a centrally planner error text that allowed anyone to
override the style. And remember, you could always get the root
behavior by using absolute paths.)

2. Base url for errors* is the configuration directory.

3. Base url for errors* is the root directory.

I'm not sure what Apache does, but if you'd like to add a bug to the
tracker, I will put it on my agenda to normalise based on what Apache
does; or at least clarify what the plt server should do.

* Although I say "errors", this should really be a policy for all "conf/" pages.

Jay

On 5/15/05, Arjun Guha <guhaarju at grinnell.edu> wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Hello,
> 
> I've customized the conf/not-found.html file on a website I run to
> include an image and use a style-sheet.
> 
> http://kdic.grinnell.edu/plt-banner.png
> http://kdic.grinnell.edu/style.css
> 
> I reference them with a relative url in conf/not-found.html:
> 
> <link rel="stylesheet" type="text/css" href="style.css" />
> <object data="plt-banner.png" height="31" width="88" type="image/png"/>
> 
> because I thought the base address of the error pages was "/".
> However, it turns out that the base address is dependent on the URL
> requested.
> 
> So, if we go here:
> 
> http://kdic.grinnell.edu/knopfler
> 
> The not-found.html page loads with the style-sheet and the image.
> 
> However, if we go here:
> 
> http://kdic.grinnell.edu/staff/satriani
> 
> The style-sheet and URL don't load[1], because the base address is of
> the error page is /staff.
> 
> I haven't done enough web programming to know if one would want this
> or not.  So, is this a bug or a feature?
> 
> -Arjun
> 
> [1] Actually, the image does load, since I copied it to /staff to
> test my theory.  However, if we request http://kdic.grinnell.edu/
> staff/satriani/ (trailing / required), it doesn't load.  My guess is
> that the code couldn't find the index file in the /staff/satriani
> directory, and set the base address to /staff/satriani.  So, this
> last bit is a bug.
> 
> 


-- 
Jay McCarthy <jay.mccarthy at gmail.com>
http://jay.makeoutcity.com/



Posted on the users mailing list.