On 07/15/2016 02:29 AM, Lars Kruse wrote:
Hi,
Am Thu, 14 Jul 2016 21:56:20 +0200 schrieb Matthias Schiffer mschiffer@universe-factory.net:
Single and double slash should be equivalent, so client software doesn't need to care.
They may feel equivalent, but they are not :)
See https://tools.ietf.org/html/rfc3986#page-13: "Thus, characters in the reserved set are protected from normalization ..."
The "equivalence" decision process is specified here: https://tools.ietf.org/html/rfc3986#page-39 Removal of double slashes is not listed (e.g. in "Syntax-Based Normalization").
Here is the condensed recipe (extracted from the standards) for serializing a URL (which is used for testing two URLs for equivalence): https://url.spec.whatwg.org/#url-serializing
Quote from above: [..] append "/", followed by the strings in url’s path (including empty strings), separated from each other by "/" [..]
Thus multiple consecutive slashes shall not be reduced to one.
Nevertheless nginx is kind enough to work around duplicate slashes by default: http://nginx.org/en/docs/http/ngx_http_core_module.html#merge_slashes
According to the RFCs above, I think the autoupdater should not request URLs with duplicate slashes, if it intends to retrieve a different URL with only single slashes.
Lars
I meant equivalence on filesystem level, not on HTTP level, so the RFCs don't really apply... But I guess there might be webservers and filesystems which don't like double slashes.
Well, I've added a simpler fix, just to be sure. This is probably moot, as the Lua-based autoupdater won't make it into another major Gluon release, but will be replaced completely.
-- NeoRaider