Re: Broken links on faq

2014-03-13 Thread Nick Holland
On 03/12/14 22:35, ropers wrote:
 On 13 March 2014 00:23, Maurice McCarthy wrote:
 On the typo http://[url snipped]/faq//faq1.html an extra faq/ is placed ...
 where it should not be.
 
 It isn't really *placed*.
 
 If you look at the HTML source, you'll see that the links that (only)
 *seem* to be acting up in connection with the mistyped URL are just
 ordinary relative links; e.g.:
 
 | Our
 | a href=../goals.htmlgoals/a place emphasis on correctness,
 | a href=../security.htmlsecurity/a, standardization, and
 | a href=../plat.htmlportability/a.
 
 It's just that your browser (and my Firefox) seems to --in this context
 at least-- interpret the // as an extra level in the hierarchy, so
 the start from www.openbsd.org/faq/ and go one level up to reach
 www.openbsd.org/ seems to become start from www.openbsd.org/faq//
 and go one level up to reach www.openbsd.org/faq/ (which doesn't have
 e.g. a goals.html).
 
 The inconsistency arises because on the one hand, the // is accepted
 as equivalent to / (which is why you're getting a page at all with
 the mistyped URL), but then on the other hand, the // is parsed as
 two hierarchy levels.
 So // counts as 1 on the way *down* the hierarchy, but it counts as
 2 on the way back *up*.

not exactly.

ok, you go to ...faq//faq1.html
The OS on the webserver takes you to [htmldocs]/faq//faq1.html.  OpenBSD
(and I believe most unix-like OSs) ignores the extra slash.

...but your browser doesn't.

So...when you click on a href=../goals.htmlgoals/a your browser
lops off one slash and submits a url to the server --
   http://.../faq/goals.html
which is wrong.

 I'm not actually sure if this behaviour is canonical, and/or whether
 it's a bug or not, either in Firefox or (also) in the HTTPD. To my
 naive mind making assumptions that are based on bugger all, the //
 ought to take you back to the root, but I haven't read the RFC/spec.
 Maybe someone else knows this off the top of their head?
 
 regards,
 --ropers
 
 PS: Okay, so I have at least skimmed parts of
 https://tools.ietf.org/html/rfc3986#section-3 - but specifically as
 the question how //s ought to be treated, I'm none the wiser.
 Apparently the only place the RFC really envisages //s is in front of
 the authority (domain name part), i.e.after http: or similar. But then
 the RFC doesn't strictly say that //s were illegal in any other place.
 If anyone else knows this, I'd be much obliged for cluebat
 ministrations.

It is really much simpler than that.

The OP's URL is *WRONG*. Plain and simple.  It shouldn't be on the
OpenBSD website at all, and it shouldn't be elsewhere, either.  It
shouldn't have been submitted to the OpenBSD web servers with the
expectation of success.  The fact that the web server returned something
looking useful has to do with what the underlying OS does with double
slashes -- just ignores them, but it isn't required/desired/whatever.
It is entirely possible to write a web server which would do something
totally different with double slashes.

So..the fact that relative links against an incorrect URL don't work is
not really an issue.  If there's an issue here (and I don't believe
there is), maybe the webserver should have 404'd on the initial URL.

(I saw a discussion recently where the idea came up of increasing
donations by by changing 404 errors to 402.  Yeah, I had to look it up,
too.  So I expect everyone who participates in this thread WILL be
buying a CD set soon. :)

Nick.



Re: Broken links on faq

2014-03-12 Thread Benjamin Baier

Your URL is wrong, try http://www.openbsd.org/faq/faq1.html

On 03/12/14 22:55, Maurice McCarthy wrote:

Just for info, many of the links on http://www.openbsd.org/faq//faq1.html are 
broken




Re: Broken links on faq

2014-03-12 Thread Alexander Hall

On 03/12/14 23:31, Benjamin Baier wrote:

Your URL is wrong, try http://www.openbsd.org/faq/faq1.html


Heh, that's funneh. I wouldn't expect that behaviour between // and 
... Interesting.


/Alexander



On 03/12/14 22:55, Maurice McCarthy wrote:

Just for info, many of the links on
http://www.openbsd.org/faq//faq1.html are broken




Re: Broken links on faq

2014-03-12 Thread Maurice McCarthy
Thanks for all the responses.

Well that was very curious to me. Suppose I learn something every day.

On http://www.openbsd.org/faq/faq1.html all the links work. On the typo
http://www.openbsd.org/faq//faq1.html an extra faq/ is placed in _some links 
where
it should not be. Such as http://www.openbsd.org/faq/donations.html

Links to faqs and man  pages appeared not to be affected.

Thanks Again
Moss



Re: Broken links on faq

2014-03-12 Thread ropers
On 13 March 2014 00:23, Maurice McCarthy wrote:
 On the typo http://www.openbsd.org/faq//faq1.html an extra faq/ is placed 
 ...
 where it should not be.

It isn't really *placed*.

If you look at the HTML source, you'll see that the links that (only)
*seem* to be acting up in connection with the mistyped URL are just
ordinary relative links; e.g.:

| Our
| a href=../goals.htmlgoals/a place emphasis on correctness,
| a href=../security.htmlsecurity/a, standardization, and
| a href=../plat.htmlportability/a.

It's just that your browser (and my Firefox) seems to --in this context
at least-- interpret the // as an extra level in the hierarchy, so
the start from www.openbsd.org/faq/ and go one level up to reach
www.openbsd.org/ seems to become start from www.openbsd.org/faq//
and go one level up to reach www.openbsd.org/faq/ (which doesn't have
e.g. a goals.html).

The inconsistency arises because on the one hand, the // is accepted
as equivalent to / (which is why you're getting a page at all with
the mistyped URL), but then on the other hand, the // is parsed as
two hierarchy levels.
So // counts as 1 on the way *down* the hierarchy, but it counts as
2 on the way back *up*.

I'm not actually sure if this behaviour is canonical, and/or whether
it's a bug or not, either in Firefox or (also) in the HTTPD. To my
naive mind making assumptions that are based on bugger all, the //
ought to take you back to the root, but I haven't read the RFC/spec.
Maybe someone else knows this off the top of their head?

regards,
--ropers

PS: Okay, so I have at least skimmed parts of
https://tools.ietf.org/html/rfc3986#section-3 - but specifically as
the question how //s ought to be treated, I'm none the wiser.
Apparently the only place the RFC really envisages //s is in front of
the authority (domain name part), i.e.after http: or similar. But then
the RFC doesn't strictly say that //s were illegal in any other place.
If anyone else knows this, I'd be much obliged for cluebat
ministrations.



Re: Broken links on faq

2014-03-12 Thread Maurice McCarthy
 On 13 March 2014 00:23, Maurice McCarthy wrote:
 On the typo http://www.openbsd.org/faq//faq1.html an extra faq/ is placed 
 ...
 where it should not be.

 It isn't really *placed*.

 If you look at the HTML source, you'll see that the links that (only)
 *seem* to be acting up in connection with the mistyped URL are just
 ordinary relative links; e.g.:

 | Our
 | a href=../goals.htmlgoals/a place emphasis on correctness,
 | a href=../security.htmlsecurity/a, standardization, and
 | a href=../plat.htmlportability/a.


OK, Thanks for the explanation.

FWIW my browser was Google Chrome Portable (Version 33.0.1750.149) on Windows 7.

M