Re: Can an HTTP path start with two slashes?

Hi David,

I did some digging around the repos and found that:

* HTTP/3 introduced the text about :path in
https://github.com/quicwg/base-drafts/pull/3352, which was based in large
part on RFC 7540.
* During the 7540bis work, issue
https://github.com/httpwg/http2-spec/issues/906 was opened by Willy noting
"incompatibility between HTTP/1 and HTTP semantics definition of
absolute-path and H2's use of RFC3986's path-absolute". This was resolved
in PR https://github.com/httpwg/http2-spec/pull/910, which moved to
absolute-path.

So it seems that unfortunately, RFC 9114 didn't pull across a similar
update to use absolute-path and is left with a similar inconsistency that
was noted in RFC 7540. I suspect this wasn't done intentionally but I'll
let Mike correct me if I'm missing something.

Cheers
Lucas

On Wed, Jul 6, 2022 at 9:36 PM David Schinazi <dschinazi.ietf@gmail.com>
wrote:

> 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:56:00 UTC