Re: Method Mania

On Sat, 3 Aug 2024 at 05:49, Josh Cohen <joshco@gmail.com> wrote:
>
> Thanks for the clarification.  Looking at the http2 rfc9113[1], bottom of section 8.3.1, says:
> "Individual HTTP/2 requests do not carry an explicit indicator of protocol version. All HTTP/2 requests implicitly have a protocol version of "2.0""
>
> So, there's no longer an explicit version string, or header.
>
> The reason I asked was when considering new methods.  The option of revving the version of the messaging/semantics layer isn't feasible.
>
> https://datatracker.ietf.org/doc/html/rfc9113#section-8.3.1
>

I'd do it the same way I would in HTTP/1.1 – either
1. send ":method: FOOBAR" and see what the server does, or
2. use OPTIONS. Either check that 'FOOBAR' is in the Allow field, or
if I want more rich capability/compliance advertisement, send a
"X-WantToUse-Foobar: 1" header field, and have the server signal its
compliance appropriately

That would always have been safer than just assuming a server that
responds to "GET / HTTP/1.2" actually paid heed to the "2"

Cheers
-- 
  Matthew Kerwin [he/him]
  https://matthew.kerwin.net.au/

Received on Friday, 2 August 2024 23:10:48 UTC