Mailing List Archive

[bricoleurs/bricolage] 638e34: Disable `UseCanonicalName`
Branch: refs/heads/master
Home: http://github.com/bricoleurs/bricolage

Commit: 638e34d5609dd6085e785493a6684099729201f3
http://github.com/bricoleurs/bricolage/commit/638e34d5609dd6085e785493a6684099729201f3
Author: David E. Wheeler <david@justatheory.com>
Date: 2010-01-27 (Wed, 27 Jan 2010)

Changed paths:
M conf/httpd.conf
M lib/Bric/Changes.pod

Log Message:
-----------
Disable `UseCanonicalName`

It turns out that, with this on, a request for a directory sans slash would cause Apache to redirect to the domain name specified in the `ServerName` directive. This was annoying if the request was sent to a different host name. Such was the case, I noticed, on my Mac, where the canonical name was set to "benedict.local" but I just used "localhost" in my browser. I'd click the "Cancel" link in a destination action profile and be confronted with the login page. This is because that link requested `/admin/profile/dest?id=1234` and mod_dir would redirect it to `/admin/profile/dest/?id=1234`, and in that redirect, it would use the canonical server name rather than the requested server name. By turning off `UseCanonicalName`, we get mod_dir to redirect to the requested host name, instead, thus avoiding that particular issue.


Commit: 5db395069a209a06fa09b03af1c9cc4c071a653b
http://github.com/bricoleurs/bricolage/commit/5db395069a209a06fa09b03af1c9cc4c071a653b
Author: David E. Wheeler <david@justatheory.com>
Date: 2010-01-27 (Wed, 27 Jan 2010)

Changed paths:
M comp/admin/profile/action/dhandler
M comp/admin/profile/server/dhandler

Log Message:
-----------
Avoid `mod_dir` redirect.

By putting a slash at the end of the directory name, we prevent `mod_dir` from redirecting, thus saving a request. There are probably other places where this would show up, but not many.