Read misc.httpmethod, misc.protocol and misc.port from their IANA registries #26

Merged
lilleman merged 16 commits from iana-network-tables into main 2026-09-20 00:50:35 +02:00
3 changed files with 10 additions and 2 deletions
Showing only changes of commit b3be1ee137 - Show all commits
+2
View File
@@ -14,5 +14,7 @@
- Hard tabs. No comment by default; delete a restatement, a rationale, history, or a file preamble. - Hard tabs. No comment by default; delete a restatement, a rationale, history, or a file preamble.
- One spelling per result: reject the other at `New`, and let the error name the spelling to use. - One spelling per result: reject the other at `New`, and let the error name the spelling to use.
- A standing choice a reader would relitigate goes under Decisions in the README, not in a comment. - A standing choice a reader would relitigate goes under Decisions in the README, not in a comment.
- Prose naming a source states what that source states: read the register's own field
before paraphrasing it.
- A README example is a `json` block that loads and renders as a category; `readme_test.go` runs every one. - A README example is a `json` block that loads and renders as a category; `readme_test.go` runs every one.
- Cyclomatic complexity is gated at 14: the table-shaped dispatches (`linkParent`, `compileTemplate`, `renderEdges`) sit at it and stay whole; a function that would pass it is decomposed. - Cyclomatic complexity is gated at 14: the table-shaped dispatches (`linkParent`, `compileTemplate`, `renderEdges`) sit at it and stay whole; a function that would pass it is decomposed.
+6
View File
@@ -1198,6 +1198,12 @@ the Development section below, and who ships a register the four above then draw
worth more than the last rows of a table. Where no such link can hold the fact worth more than the last rows of a table. Where no such link can hold the fact
stays a column. Layer your own `misc.territory` over the shipped one and you stays a column. Layer your own `misc.territory` over the shipped one and you
must layer `misc.timezone` too, or the link fails at load naming the row. must layer `misc.timezone` too, or the link fails at load naming the row.
- **A table whose register publishes no frequency draws evenly.** `misc.httpmethod`,
`misc.port`, `misc.httpstatus` and `misc.mimetype` weigh every row alike, so GET is
a ninth of the methods drawn. Goal 10 keeps an authored fact out of a sourced table,
and no register publishes how often a method or a port is used, so a weight here
would be invented. Where one exists it is read, as `misc.timezone` reads GeoNames
populations and `sv_SE.first-name` SCB bearers.
- **`misc.port` selects by number, and carries no `name`.** 29 of its services sit on - **`misc.port` selects by number, and carries no `name`.** 29 of its services sit on
more than one port, `http-alt` on three, so `misc.port[http-alt]` could name no one more than one port, `http-alt` on three, so `misc.port[http-alt]` could name no one
row. The number is what a port field holds anyway, and `misc.port[443].service` row. The number is what a port field holds anyway, and `misc.port[443].service`
+2 -2
View File
@@ -4,8 +4,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 RFC 9110 section 9.3 or RFC 5789 for it, which 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 is the eight HTTP defines and PATCH; the register's other entries do not. The
consumer's boolean reads. register's `yes` and `no` ship as `true` and `false`, which a consumer's boolean reads.
""" """
import argparse import argparse
import csv import csv