Skip to content

docs(const,vendor): Method.get cites RFC 959 §4 for a case-insensitivity rule stated in §5.3 #947

Description

@JarryShaw

Describe the bug

Method.get's docstring explains its own case-sensitivity by contrast with FTP, and cites the wrong section of RFC 959 for the contrast:

pcapkit/const/http/method.py:268      pcapkit/vendor/http/method.py:173
    case-insensitive because :rfc:`959#section-4` says FTP
    command codes are not.

RFC 959 §4 is FILE TRANSFER FUNCTIONS and contains no case-sensitivity language at all. The statement is in §5.3 COMMANDS:

The command codes are four or fewer alphabetic characters. Upper and lower case alphabetic characters are to be treated identically.

Reproduction

$ curl -s -A 'Mozilla/5.0' -L https://www.rfc-editor.org/rfc/rfc959.html -o rfc959.html
$ grep -n -i 'upper and lower' rfc959.html
2469:      Upper and lower case alphabetic characters are to be treated
$ grep -n 'id="section-4"\|id="section-5"\|id="section-6"' rfc959.html
1329:...id="section-4"...4.  FILE TRANSFER FUNCTIONS
2333:...id="section-5"...5.  DECLARATIVE SPECIFICATIONS
2920:...id="section-6"...6.  STATE DIAGRAMS
$ grep -n '5\.3\.  COMMANDS' rfc959.html
2458:   5.3.  COMMANDS

Line 2469 sits between section-5 (2333) and section-6 (2920), so it is inside §5, not §4. That is the only such sentence in the document — note it wraps across lines 2469-2470, so a single-line grep for treated identically finds nothing.

Expected behavior

:rfc:959#section-5``, which is the finest anchor RFC 959 renders (only section-1..`section-8` exist, per #944). Alternatives: `#page-45`, where §5.3 begins, or leave `#section-4` and reword the prose to stop attributing the claim to a section that does not make it.

Notes

System information

  • pcapkit commit 210bdb419, Python 3.14.7, CPython, Linux.

Activity

  1. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    constRegenerated IANA or vendor constant tables; members keep their numeric values
    docsPull requests that change documentation only (docs: subject prefix)
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Sep 30, 2026
  2. JarryShaw commented on Sep 30, 2026

    @JarryShaw
    OwnerAuthor

    Correcting my own framing: this is not a new finding, and the repo already ruled on it.

    tests/protocols/application/test_ftp_unit.py:86-102 has said so since #582:

    The citation is section 5.3 (COMMANDS, which gives the command syntax), not section 4.1 (FTP COMMANDS, which only lists the per-command semantics); #582 cited 4.1 and a cross-review caught it. Verified against the RFC text: the sentence sits between the 5.3 and 5.4 headings.

    So §5.3-not-§4.1 was established once already, and the habit outlived the correction. That makes this a recurrence rather than a discovery, and it widens the scope: the same misattribution is on seven sites, not one —

    pcapkit/const/http/method.py:268        pcapkit/vendor/http/method.py:173
    docs/source/contributing/conventions/registry-protocol.rst:224,281,337,443
    tests/const/test_const_enum_no_mint.py:2111
    

    Line 281 is the clearest: it cites 959#section-4.1 directly above the quote "Upper and lower case alphabetic characters are to be treated identically" — §5.3's own sentence, attributed to §4.1 in the same table row.

    That same docstring also drew the distinction this issue needs: ftp/command.py's citations are the command-kind claim, which §4 does support, so those are correct and are not in scope here.

    #946 now fixes the dead anchor at all thirteen 959 sites (including two #section-5.3 roles, also dead) but deliberately does not re-point any of these seven, because which section they should name is this issue's question. The choice is unchanged: #section-5 is the finest live anchor, #page-45 is where §5.3 begins, or reword the prose to stop attributing the rule to a section that does not state it.

    My lean is #section-5, matching what #946 already did to the two roles that only carried the case claim. Still yours to call.

  3. JarryShaw commented on Sep 30, 2026

    @JarryShaw
    OwnerAuthor

    Sure section-5 works

  4. JarryShaw commented on Sep 30, 2026

    @JarryShaw
    OwnerAuthor

    Ruling — #section-5. Verbatim:

    Sure section-5 works

    So the seven sites that attribute FTP command case-insensitivity to §4 now cite :rfc:`959#section-5, the finest live anchor RFC 959 renders:

    pcapkit/const/http/method.py:268        pcapkit/vendor/http/method.py:173
    docs/source/contributing/conventions/registry-protocol.rst:224,281,337,443
    tests/const/test_const_enum_no_mint.py:2111
    

    #946 already retargeted these to #section-4 to kill the dead #section-4.1 anchor; this moves them one further, to the section that actually states the rule. The two ftp/command.py pairs stay at #section-4 — they carry the command-kind claim, which §4 does support, as tests/protocols/application/test_ftp_unit.py has documented since #582.

    needs: decision off, wip on. Folding into #946 rather than raising a second PR, since it is the same files and the same defect class, and #946 has not merged.

  5. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Sep 30, 2026
  6. JarryShaw commented on Sep 30, 2026

    @JarryShaw
    OwnerAuthor

    Applied in #946 at 0d025d24d — six of the seven sites now cite :rfc:959#section-5``:

    pcapkit/const/http/method.py:268        pcapkit/vendor/http/method.py:173
    tests/const/test_const_enum_no_mint.py:2111
    docs/source/contributing/conventions/registry-protocol.rst:224, 281, 443
    

    The seventh, registry-protocol.rst:337, is left at #section-4 and flagged on the PR rather than moved. Its row claims the RFC presents the kind and conformance letters upper case (A/P/S, M/O/H), which is §4.1's command list — not §5.3's case-insensitivity rule. I had listed it among the seven when asking, so applying the ruling literally there would have made that citation worse.

    Staying wip until #946 merges.

  7. JarryShaw commented on Sep 30, 2026

    @JarryShaw
    OwnerAuthor

    Done — #946 merged as 793aecd11. Verified on main rather than on the branch:

    pcapkit/const/http/method.py         section-5=1  section-4=0
    pcapkit/vendor/http/method.py        section-5=1  section-4=0
    tests/const/test_const_enum_no_mint.py  section-5=1  section-4=0
    registry-protocol.rst                section-5=3  section-4=1
    pcapkit/const/ftp/command.py         section-5=0  section-4=2
    

    All six sites this issue covers now cite :rfc:959#section-5``, the section that actually states FTP command case-insensitivity. The http/method.py pair stays byte-identical on the cited line.

    The five deliberate exceptions keep #section-4, as recorded on the PR: the four ftp/command.py sites carry the command-kind claim, which §4 does support, and registry-protocol.rst:337 claims the RFC presents the kind and conformance letters upper case — §4.1's command list rather than §5.3's comparison rule. That last one I flagged rather than moved, since following this issue's ruling literally there would have made the citation worse. Say the word if you would rather it matched the others.

    Closing.

  8. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Sep 30, 2026
  9. added this to the 1.5 milestone on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)constRegenerated IANA or vendor constant tables; members keep their numeric valuesdocsPull requests that change documentation only (docs: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions