[Catalog-sig] Changes to the simple pages

P.J. Eby pje at telecommunity.com
Fri Jan 22 00:07:06 CET 2010


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.



More information about the Catalog-SIG mailing list