On Mon, Jul 27, 2015 at 12:45 AM, Dimstar / Dominique Leuenberger <dimstar@opensuse.org> wrote:
On Sun, 2015-07-26 at 08:37 -0700, PatrickD Garvey wrote:
On Sat, Jul 25, 2015 at 11:51 PM, Dimstar / Dominique Leuenberger <dimstar@opensuse.org> wrote:
On Sat, 2015-07-25 at 15:55 -0700, PatrickD Garvey wrote:
Now help me understand why download.opensuse.org/distribution/leap/42.1-Milestone1 (note the lack of a trailing /) redirects to download.opensuse.org/distribution/leap/42.1-Milestone1/ (with /) but download.opensuse.org/distribution/leap/42.1 (without) doesn't.
42.1-Milesteon1 is an actual existing directory on the server - so the web server can 'enter' the directory and your browser correctly reflects this with the added /
42.1 OTOH is only a server based redirect (and does not exist as a directory on the server). And the rule HAS to be to match 42.1$ ($ being 'end of line') as otherwise there would be strange redirects happening for everything with 42.1 in it.
In essence: the structure on the server is setup for zypper / yast as main consumers... and for those usecases it works. For a human, there are some special cases to consider (like adding the / ).
Am i missing something about Linux directories that I didn't learn from using UNIX (AIX)?
Not really - just, as noted above: only one is a directory on the server, the other is a http server configured redirect (see for example apache's mod_rewrite for an idea)
Cheers, Dominique
Thank you, that answers my question completely, but it leads, of course, to the final question, Since I don't have access to the server nor the required knowledge on how to add the additional redirect, will someone else take the initiative to add the redirect to the server? We humans like easy paths to our desired results whenever a small effort can compensate for multiple repetitions of human frailties.
You can't do a rewrite without the trailin slash without breaking the system badly.
In short, mod_rewrite does a pattern match / replace. The normal way is:
download.opensuse.org/distribtion/leap/42.1$ ($ indicating end of line) rewritten to download.opensuse.org/distribution/leap/42.1-Milestone1
if you now leave the $ away, you end up with download.opensuse.org/distribtion/leap/42.1-Milestone1 being matched by the pattern, and being rewritten as
download.opensuse.org/distribtion/leap/42.1-Milestone1-Milestone1, and so on and so forth..
I guess you understand this won't work very well :) (it CAN be worked arund with more complexity, but that generally leads to a new can of worms, causing much more debug work and more random errors).
(there are more such cases in the setup, like e.g: http://download.opensuse.org/update/tumbleweed is 404, whereas http://download.opensuse.org/update/tumbleweed/ redirects properly to the Tumbleweed update channel.
The added complexity sort of does not weigh up the minimal gain received.
Dominique
Thank you, Dominique. I've followed what you have explained. I guess any further proposal from me will have to wait until I try to release my own distro of an operating system. Naming really ought to be easier than this, but I guess it isn't. Thank you, PatrickD -- To unsubscribe, e-mail: opensuse-project+unsubscribe@opensuse.org To contact the owner, email: opensuse-project+owner@opensuse.org