Credit RFC 5789 for PATCH, which RFC 9110 does not define
Tests / vet + fmt + tests (pull_request) Successful in 1m21s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped

This commit is contained in:
2026-09-20 00:45:23 +02:00
parent b3ead0ca5e
commit 5083b79730
3 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ replacement, and each removed path, column or flag.
`device` and `os` columns. `misc.car` keeps its makes and models in a `make` and a
`model` column.
- `misc.httpmethod`, `misc.protocol` and `misc.port` are IANA's registries as tables.
`misc.httpmethod` is the nine methods the HTTP core specification defines, carrying
`misc.httpmethod` is the eight methods RFC 9110 defines and PATCH, carrying
`safe` and `idempotent` as `true` or `false`; `misc.protocol` the keyword, its
`number` and its `name`, selectable by either; `misc.port` renders a TCP port number,
with the IANA `service` name beside it, keeping the first service the registry
+2 -2
View File
@@ -173,8 +173,8 @@ select a row; `car` and `useragent` carry no key or name, so they are drawn from
than selected in.
`misc.httpmethod`, `misc.protocol` and `misc.port` are IANA's registries.
`misc.httpmethod` is the nine methods the HTTP core specification defines; the
register's other entries, WebDAV and DeltaV among them, do not ship. Its `safe` and
`misc.httpmethod` is the eight methods RFC 9110 defines and PATCH; the register's
other entries, WebDAV and DeltaV among them, do not ship. Its `safe` and
`idempotent` are `true` or `false`, so a Go `bool` reads them, though `--format json`
and `sql` write them as text, a table column carrying no datatype. `misc.protocol`
carries a `number` and a `name`, the keyword itself where the register spells none out,
+3 -4
View File
@@ -3,9 +3,8 @@
data-import/httpmethod.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
A method ships when the register cites the HTTP core specification for it, RFC 9110
section 9.3 or RFC 5789, which is the nine a request carries; the register's other
entries do not. The register's `yes` and `no` ship as `true` and `false`, which a
A method ships when the register cites RFC 9110 section 9.3 or RFC 5789 for it, which
is the eight HTTP defines and PATCH; the register's other entries do not. The register's `yes` and `no` ship as `true` and `false`, which a
consumer's boolean reads.
"""
import argparse
@@ -52,7 +51,7 @@ def main():
a = p.parse_args()
table = sorted(rows(source.fetch(a.source, a.cache, "http-methods.csv").decode("utf-8")), key=lambda r: r["method"])
if len(table) != EXPECTED:
sys.exit(f"{len(table)} methods cite the core specification, not {EXPECTED}; the register's Reference column has moved")
sys.exit(f"{len(table)} methods cite RFC 9110 section 9.3 or RFC 5789, not {EXPECTED}; the register's Reference column has moved")
tsv.write(a.out, COLUMNS, table)