~divmod-dev/divmod.org/linkto-2481

Viewing all changes in revision 2420.

  • Committer: exarkun
  • Date: 2008-01-18 15:49:56 UTC
  • Revision ID: svn-v4:866e43f7-fbfc-0310-8f2a-ec88d1da2979:trunk:14770
Merge css-rewriting-2449-4

Author: exarkun
Reviewer: moea, washort
Fixes #2449

Change the implementation of WebSite.rootURL so that it considers the Host
header of the request when constructing the URL to return.  Requests made
to unrecognized hosts will now have a root URL which is absolute and includes
the configured hostname of the WebSite.  This allows name-based virtual
hosting to work without requiring all static content to be served beneath
the virtual host domain name.  Requests made to recognized hosts will continue
to use relative URLs with absolute paths.

Numerous lesser, related changes have been made as well.  Mantissa's Offering
interface now includes support for the definition of the root of an offering's
static content and this is now served without requiring a session.  Offerings
are now managed using an object implementing a new mantissa interface rather
than with free functions.  The base XHTML directory theme class now supports
a simpler API for adding a stylesheet to the head of pages.  Many classes now
use ThemedDocumentFactory rather than trying to load a document factory directly.
A group of resource/request related classes have been added which support
applying a transformation to any CSS file served by the site (these are not
currently used, but may be required if the root path to a WebSite is ever not
"/"; they also serve as an example of how to implement arbitrary response
transformations in a general way, so may be useful as an example for gzip
content transfer encoding).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: