[Catalog-sig] Changes to the simple pages
ianb at colorstudy.com
Fri Jan 22 07:35:21 CET 2010
On Thu, Jan 21, 2010 at 5:07 PM, P.J. Eby <pje at telecommunity.com> wrote:
> At 11:15 PM 1/21/2010 +0100, Martin v. Löwis wrote:
>> > If you use <base href> that might resolve this problem (pip looks at
>> > this, I haven't checked the setuptools code).
>> Thanks for the hint - unfortunately, that would defeat the purpose;
>> if the pages are mirrored as-is, they would then refer back to
>> python.org, whereas having them truly relative was exactly desired
>> for the mirroring.
>> So I guess I'll just arrange for the pages to depend on the
>> exact URL being queried. According to the setuptools spec, the
>> version with the trailing slash is the "official" one.
> A simple fix may be to make the unterminated URLs issue a redirect to the
> /-terminated version, i.e. make /foo redirect to /foo/ - this is what both
> Apache and Zope do for such cases, and setuptools uses the final resolved
> URL as its base URL.
> Anyway, that would allow you to not worry about generating correct URLs for
> the unterminated case.
Agreed, this is the best solution generally to ambiguous /'s. Though
sometimes it's easier to always strip /'s; you can do that globally, but you
can't add /'s globally.
Ian Bicking | http://blog.ianbicking.org |
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalog-SIG