0

I'm doing an university work on HTTP and I try to explain what happens when there is an HTTP connection between a client and a server. To do this, I'm using the "curl -v -i" command on an Ubuntu Terminal, which shows the headers of an HTTP connection. In this case, the connection to the server is made with the HTTP/1.1 version.

I want to use the most current sources. In the first place, I was referencing document RFC2616, but in this blog (https://www.mnot.net/blog/2014/06/07/rfc2616_is_dead) it says that the most modern document is RFC 7231. My questions are: Is that true? Do all HTTP/1.1 connections use RFC 7231 specifications? Is it possible that RFC 7231 has already been replaced by a more modern one?

Thank you very much.

john smith
  • 41
  • 2

4 Answers4

1

It must be, as it doesn't show that it's been updated by another RFC, like in the example below for RFC 2821.

enter image description here

Whereas RFC 7231 shows no such Updated by:

enter image description here

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
1

HTTP/1.1 is officially described by 6 RFCs:

  1. RFC 7230, HTTP/1.1: Message Syntax Routing
  2. RFC 7231, HTTP/1.1: Semantics and Content
  3. RFC 7232, HTTP/1.1: Conditional Requests
  4. RFC 7233, HTTP/1.1: Range Request
  5. RFC 7234, HTTP/1.1: Caching
  6. RFC 7235, HTTP/1.1: Authentication

However, errata exist for most of these.

These RFCs are also current being revised again by the HTTP Working Group of the IETF and are expected to be formalised as RFCs “soon”, which will presumably “obsolete” those 6.

And of course there is the HTTP/2 RFC but will ignore that since you specifically talk about HTTP/1.1, and both HTTP/1.1 and HTTP/2 share the same semantics pretty much. On that note HTTP/3 is also due to be published “soon”.

Additionally there are many, many RFCs that extend HTTP with additional headers and the like.

And as another answer has indicated, many servers do not follow the spec precisely due to bugs or even because the implementor specifically decided not to. HTTP is a rich, large and complex protocol and the web has always been quite forgiving compared to some areas of computing where a missing or incorrect semi-colon can stop the whole program. There is even a well-known maxim called Postel’s Law that states “be conservative in what you do, be liberal in what you accept from others.” so many implementations accept messages that a strict reading of the spec would not allow. Though on that subject it should be noted that the IETF have another draft RFC arguing that Postel’s Law (aka “The Robustness Principal”) is harmful.

Barry Pollard
  • 4,461
  • 14
  • 26
0

As of 2022, no. There is a new RFC series defining the various HTTP versions and their shared semantics. These are the ones that apply ot HTTP/1.1:

https://www.rfc-editor.org/rfc/rfc9110.html https://www.rfc-editor.org/rfc/rfc9111.html https://www.rfc-editor.org/rfc/rfc9112.html

jsha
  • 111
  • 3
0

Just because there is a new RFC doesn't mean that the clients and servers have been updated to implement the new/changed stuff. Even with an old RFC or a single RFC for something the clients and servers may not fully implement it or implement it with their own extensions.

I would recommend either sticking exactly to the RFC and doing it all in flow charts/diagrams/UML, psuedocode, etc or determining how it is actually implemented in some of the more popular servers and clients. Since they are Open Source the source is the definitive answer to your question.

Hopefully the source is well commented not just to what is being done but why it is being done (ie, which bit of the RFC it applies to) but that is my typical pipe dream.

ivanivan
  • 1,448
  • 6
  • 6