Read misc.httpmethod, misc.protocol and misc.port from their IANA registries #26
+1
-1
@@ -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
|
`device` and `os` columns. `misc.car` keeps its makes and models in a `make` and a
|
||||||
`model` column.
|
`model` column.
|
||||||
- `misc.httpmethod`, `misc.protocol` and `misc.port` are IANA's registries as tables.
|
- `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
|
`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,
|
`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
|
with the IANA `service` name beside it, keeping the first service the registry
|
||||||
|
|||||||
@@ -173,8 +173,8 @@ select a row; `car` and `useragent` carry no key or name, so they are drawn from
|
|||||||
than selected in.
|
than selected in.
|
||||||
|
|
||||||
`misc.httpmethod`, `misc.protocol` and `misc.port` are IANA's registries.
|
`misc.httpmethod`, `misc.protocol` and `misc.port` are IANA's registries.
|
||||||
`misc.httpmethod` is the nine methods the HTTP core specification defines; the
|
`misc.httpmethod` is the eight methods RFC 9110 defines and PATCH; the register's
|
||||||
register's other entries, WebDAV and DeltaV among them, do not ship. Its `safe` and
|
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`
|
`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`
|
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,
|
carries a `number` and a `name`, the keyword itself where the register spells none out,
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
data-import/httpmethod.py [--source URL_OR_FILE] [--cache DIR] [--out FILE]
|
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
|
A method ships when the register cites RFC 9110 section 9.3 or RFC 5789 for it, which
|
||||||
section 9.3 or RFC 5789, which is the nine a request carries; the register's other
|
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
|
||||||
entries do not. The register's `yes` and `no` ship as `true` and `false`, which a
|
|
||||||
consumer's boolean reads.
|
consumer's boolean reads.
|
||||||
"""
|
"""
|
||||||
import argparse
|
import argparse
|
||||||
@@ -52,7 +51,7 @@ def main():
|
|||||||
a = p.parse_args()
|
a = p.parse_args()
|
||||||
table = sorted(rows(source.fetch(a.source, a.cache, "http-methods.csv").decode("utf-8")), key=lambda r: r["method"])
|
table = sorted(rows(source.fetch(a.source, a.cache, "http-methods.csv").decode("utf-8")), key=lambda r: r["method"])
|
||||||
if len(table) != EXPECTED:
|
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)
|
tsv.write(a.out, COLUMNS, table)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user