2

RFC 7230 (HTTP/1.1 message Syntax and Routing) specifies that "must", "shall", "should", and "may" are to be interpreted as described in RFC 2119. However in addition to those requirement specifiers, RFC 7230 also seems to use "ought" as requirement specifiers in 23 separate locations within the document.

I originally assumed that "ought" is equivalent to "should" but there are some instances where interpreting it as "shall" might make more sense. The word definitions I've found support both usages.

So my question is as follows: How should "ought" be interpreted as when encountered within rfc7230 (and its siblings)?

Tenders McChiken
  • 1,216
  • 13
  • 21

1 Answers1

2

From HTTP persistent connection:

According to RFC 7230, section 6.4, "a client ought to limit the number of simultaneous open connections that it maintains to a given server". The previous version of the HTTP/1.1 specification stated specific maximum values but in the words of RFC 7230 "this was found to be impractical for many applications... instead... be conservative when opening multiple connections".

Here "ought" has a bit of both meanings: formerly "shall," relaxed to "should." That is, definitely not "shall."

And in this answer someone also has the strong opinion that "ought" is not "shall,"

Note the weak "ought to" here which is far from MUST. But at least net/http is fully correct in that this kind of response is wrong and can be handled as error. But it is not required to be treated as error.

And in all the examples in What's difference between HTTP 301 and 308 status codes? I think it's clear "ought" means "should," not "shall."

Finally, from simply a usage of words standpoint, "ought" isn't a common or natural choice of word—no one uses it willy nilly—the word is only used when the author can't commit to "shall."

So at this point, I'd say if you're definitely sure an "ought" should have been a "shall," then it was more likely an error in the document, or something closer to my first example where it was historically a "shall."

In any case it's probably best to ask specifically about the clauses you care about, to experts.

Andrew Cheong
  • 29,362
  • 15
  • 90
  • 145