On Tue, Jan 23, 2024 at 07:30:49AM -0500, Greg Wooledge wrote: [...] > Also from the "weird results" category: if I mangle the URL by using > two slashes instead of three, Chrome appears to treat that as a > relative pathname, attempts to open usr/share/whatever instead of > /usr/share/whatever, fails, and gives me an error page. However, if I > mangle the URL by using *one* slash instead of three, it treats that > as if I had used all three slashes, and I get the document. I'm a sucker for Google bashing myself (there are more than enough reasons to bash them, mind you), but this weirdness you describe is built into the URL syntax [1]. When there are two slashes, they belong to the so-called "authority" part (think host+port in HTTP URLs). Since file: doesn't have that (it's always empty) whatever comes after file:// is the path. One more slash and you have an absolute path. No slash after that, and you have a relative path. The one-slash-alone is interpreted as "no authority part" (it is optional) and the path starts with /, so, again, absolute. No slashes at all should be, again, relative (I never tried to find out wrt what, possibly the browser's CWD, but who knows). The whole Internet after mid to late 90ies is a horror story. That's what happens when people grab the designs before giving designers time to think over things. What I call no-backtracking design. Cheers [1] https://en.wikipedia.org/wiki/URL -- t
Attachment:
signature.asc
Description: PGP signature