On 2012-01-22 02:39, Thomas 'PointedEars' Lahn <
Point...@web.de> wrote:
> Peter J. Holzer wrote:
>> Mir fällt nur eine Ausnahme ein:
http://foo.com und
http://foo.com/
>> bezeichnen tatsächlich beide /per definitionem/ die gleiche Resource,
>> und die erste Form ist die kanonische […]
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Wo steht das geschrieben?
Gute Frage. Ich dachte, es wäre RFC 1738 gewesen, aber dort finde ich nur:
| If neither <path> nor <searchpart> is present, the "/"
| may also be omitted.
Der war es also nicht. Aber es müsste ein RFC aus dieser Zeit (Mitte der
90er-Jahre) gewesen sein.
In RFC 3986 hingegen steht:
|
http://example.com
|
http://example.com/
| http://example.com:/
|
http://example.com:80/
|
|
| In general, a URI that uses the generic syntax for authority with an
| empty path should be normalized to a path of "/". Likewise, an
| explicit ":port", for which the port is empty or the default for the
| scheme, is equivalent to one where the port and its ":" delimiter are
| elided and thus should be removed by scheme-based normalization. For
| example, the second URI above is the normal form for the "http"
| scheme.
Das widerspricht meiner Erinnerung also direkt und definiert das so, wie
es meiner Meinung nach sein sollte. Das freut mich, also werde ich in
Zukunft RFC 3986 zitieren und vergessen, jemals etwas anderes gelesen zu
haben.