Can an HTTP path start with two slashes?

Howdy HTTP enthusiasts,

Today I was trying to answer the question "can an HTTP path start with two
slashes?". To me, that question was equivalent to "Is the following URI
valid? https://example.org//foo"

I did some digging into the specs, and noticed something odd:
In HTTP/3, the :path pseudo-header uses "path-absolute" [1]
In HTTP/2, the :path pseudo-header uses "absolute-path" [2]
In HTTP/1.1, origin-form uses "absolute-path" [3]
"absolute-path" allows paths that start with "//" but "path-absolute"does
not [4]

So, does that mean that the answer to my question above depends on which
underlying HTTP version is in use? If yes, was that intentional?

Thanks,
David

[1]
https://www.rfc-editor.org/rfc/rfc9114.html#name-request-pseudo-header-field
[2]
https://www.rfc-editor.org/rfc/rfc9113.html#name-request-pseudo-header-field
[3] https://www.rfc-editor.org/rfc/rfc9112.html#name-origin-form
[4] https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-references

Received on Wednesday, 6 July 2022 20:32:13 UTC