Doubled slashes in master_sites

Randall Wood randall.h.wood at alexandriasoftware.com
Mon Dec 10 01:44:59 PST 2007


On 12/10/07, Ryan Schmidt <ryandesign at macports.org> wrote:

I'm not sure if I'd be in favor of automated stripping of doubled
> slashes within URLs. It introduces a bit of magic into the
> master_sites variable, and I think magic should be avoided. And
> theoretically, a server could behave differently depending on the
> number of slashes. In practice, though, Apache collapses doubled
> slashes into a single one, and I don't know of any sites that would
> rely on double slashes in their download URLs.
>
> What do you all think?
>

RFC 2396 (Uniform Resource Identifiers (URI): Generic Syntax) dictates that
"URI that are hierarchical in nature use the slash "/" character
for separating hierarchical components." so it seems to me that the
correct behavior is that null path components (the component between the two
slashes in "//") evaluate as a single slash "/".

We should clean that up programatically, since some port maintainers may
prefer to leave the extra slashes around the variables for legibility
purposes.

-- 
Randall Wood
randall.h.wood at alexandriasoftware.com

"The rules are simple: The ball is round. The game lasts 90 minutes. All the
rest is just philosophy."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-dev/attachments/20071210/e981bbce/attachment-0001.html


More information about the macports-dev mailing list