Skip to content

fix(ftp,httpv1): command case and HTTP/1 whitespace are normalised on rebuild #1333

Closed

Description

@JarryShaw

Decision needed: these round trips normalise on purpose, and under the every-round-trip-matches ruling each one is a mismatch.

  1. FTP command case: quit\r\n rebuilds as QUIT\r\n (made deliberate by Command.get raises TypeError on the first lowercase FTP command, so a valid RFC 959 request cannot be parsed #582).
  2. HTTP/1 whitespace: a leading space or tab in a reason phrase and trailing \t/\x0c in a request URI are stripped. Header Host:a becomes Host: a, and obs-fold X: a\r\n b becomes X: a b (the RFC 9112 remedy).

Options:

  • (1) Keep the raw bytes (recommended). The data model gets the original token or line, while the parsed values stay normalised for lookup. Rebuilds become byte-exact and the parsed values do not change.
  • (2) Document these as lossy by design and exempt them from the round-trip suite.

I recommend (1): it follows the ruling without changing what users see in info.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Oct 7, 2026
  2. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    take (1)

  3. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    Ruling recorded: option (1). FTP command case and the HTTP/1 whitespace normalisations keep the raw bytes, so rebuilds become byte-exact while the parsed values stay normalised for lookup. Nothing users read in info changes.

    Blocked on #1301, which already owns ftp.py and httpv1.py and is at review: good-to-go. Two PRs editing those files would clobber each other, so this starts once #1301 merges.

  4. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    and removed
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Oct 7, 2026
  5. moved this to Blocked in PyPCAPKiton Oct 7, 2026
  6. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1301 merged at 19:09Z, so the file conflict is gone. Back to pending until a worker picks it up.

  7. added
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  8. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 7, 2026
  9. added this to the PyPCAPKit v1.5 milestone on Oct 26, 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

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions