Summary

  • RFC 7320, July 2014, Best Current Practice 190, restates that "the structure of a URI is defined by its scheme", and that publishing independent standards which mandate particular URI substructure "is inappropriate, because that essentially usurps ownership".
  • Its rules are mostly prohibitions. A specification that defines substructure within a scheme "MUST do so in the defining document for that URI scheme", and other specifications "MUST NOT constrain, or define the structure or the semantics for URI authorities, unless they update the scheme registration itself".
  • The document exists because specifications kept doing the opposite: fixing path shapes for resources they did not administer, and then defending those shapes once they were published.

Who owns the inside of a URL

A URI looks like a filing cabinet: scheme, authority, path, query. Only the outer layer is defined by the URI standard. The rest is delegated, by the scheme's own definition, to whoever runs the identifier.

That delegation matters because paths are operational decisions. A service that moves from one prefix to another, or from an opaque identifier to a readable one, is exercising ownership, not changing a contract.

The bad habit the document attacks

The failure mode is familiar. A working group writes a specification for a protocol that happens to use HTTP, and specifies that its resources live under a fixed prefix, with a fixed order of path segments, and with a fixed meaning for each segment.

Once that ships, the prefix becomes a promise, the segments become a schema, and the service that owns the URL space can no longer reorganise it without breaking software written by people who never administered the service.

Prohibitions with reasons

The rules are short and each closes a specific hole. Schemes are the place where substructure may be defined, because a scheme document is the one document that owns the syntax. Authorities belong to the scheme registration, so a later spec may not decide that a hostname prefix carries meaning.

The document also tells specifications not to lock out future schemes, which is the same argument one level up: a rule that fixes the outside forecloses the inside.

What to do instead

The constructive half of the document lists alternatives to fixing structure: relax requirements where the exact form does not matter, use content negotiation and discovery rather than hard-coded paths, and let the application define what it needs at runtime.

That is a harder way to write a specification. A rule that says "the resource is at this path" is simple to test and simple to break; a rule that says "discovery finds the resource" is harder to describe and survives the owner rearranging the furniture.

A standard about leaving room

RFC 7320 adds no protocol feature. It is almost entirely a constraint on the behaviour of standards writers, and it was published as a best current practice because that is what it is: a convention among the people who write the rules, about which rooms they are allowed to decorate.

The lesson generalises past URIs. Any shared space accumulates specifications that want to pin down details they only borrow, and the cost is paid later by whoever has to change the thing that was pinned.