Skip to content

Add a section about the HTTP protocol#376

Open
martinbonnin wants to merge 5 commits intomainfrom
http-protocol
Open

Add a section about the HTTP protocol#376
martinbonnin wants to merge 5 commits intomainfrom
http-protocol

Conversation

@martinbonnin
Copy link
Copy Markdown
Contributor

The current spec mentions HTTP 1.1 everywhere so I guess this is a requirement? But we might want to allow HTTP 2.0 still?

@martinbonnin martinbonnin changed the title Add a note about the HTTP protocol Add a section about the HTTP protocol Apr 2, 2026
@benjie
Copy link
Copy Markdown
Member

benjie commented Apr 2, 2026

The current spec mentions HTTP 1.1 everywhere

I searched for 1.1 in the spec and I found a single hit - the part that governs what to do if no Accept header is provided. Am I missing other positions?

In alignment with the HTTP 1.1 Accept
specification, when a client does not include at least one supported media type
in the Accept HTTP header, the server MUST either:

  1. Respond with a 406 Not Acceptable status code and stop processing the
    request (RECOMMENDED); OR
  2. Disregard the Accept header and respond with the server's choice of media
    type (NOT RECOMMENDED).

My interpretation of this (and to be fair it looks like I may have been the person who wrote it, so I'm not impartial), it's saying "here's what to do if there's no Accept, which follows the conventions laid out by HTTP1.1's definition of Accept". I don't think it's requiring the use of HTTP 1.1 at all?

Copy link
Copy Markdown
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced that we should require support for HTTP1.1. Is there a good reason that servers should not be able to be HTTP2+ only?

@martinbonnin
Copy link
Copy Markdown
Contributor Author

martinbonnin commented Apr 2, 2026

https://graphql.github.io/graphql-over-http/draft/#sel-DANFCAACCB_9Z

A server must comply with [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231).

And RFC7231 starts with "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content". I didn't read the whole RFC so maybe it's just about semantics but it wasn't immediatly clear that HTTP 2 was supported.

I'm not convinced that we should require support for HTTP1.1. Is there a good reason that servers should not be able to be HTTP2+ only?

I also think we should allow HTTP2+ only. Maybe it's just a clarifying sentence that

A server MUST comply with RFC7231 semantics. 

A server MUST support at least one version of HTTP message format, such as 1.1 or 2.0 as long
as the RFC7231 semantics are observed. 

It is recommended that a server supports several versions of the HTTP message format for wider
compatibility.

Or something like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants