Skip to content

fix(application): HTTP/2 from_data writes a stale Length; zero-fill cut schema lists in core #2686

Closed

Description

@JarryShaw

Found by the short-read audit, and confirmed by an independent re-probe.

Regression from #2666, unreleased. HTTPv2._make_data now passes frame_length from the parsed Length for every frame. Edit a whole frame's data model and from_data:

  • If the rebuilt frame is shorter, it writes the stale Length.
  • If it is longer, it raises ProtocolError.

Before #2666, it recomputed the Length.

Design. #2666 and #2662 handle a cut list with hand-rolled pieces: SettingPairListField and GroupRecordListField (each a ListField.unpack override), HTTPv2.make(frame_length=), and the _made_length side channel. The capture-cut record is the built-in one. What's missing is the zero-fill that FieldBase.unpack gives every other field: ListField with SchemaField items raises on a short buffer instead.

Fix:

  • Give ListField with schema items the same zero-fill to the declared width, once in core.
  • Remove both list subclasses and the frame_length and _made_length channels, so make() recomputes the Length as it does for DATA.
  • If that cannot land in time, the minimal fix is to pass frame_length only when info carries __short_read__.

Both need regression tests that edit a whole frame and round-trip it through from_data(info.to_dict()).

Activity

  1. added this to the PyPCAPKit v1.6 milestone on Nov 2, 2026
  2. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    on Nov 2, 2026
  3. moved this to Pending in PyPCAPKiton Nov 2, 2026
  4. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    Filed from the short-read audit, and confirmed by an independent re-probe. A worker is on it now. Moved to wip.

  5. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 2, 2026
  6. moved this from Pending to WIP in PyPCAPKiton Nov 2, 2026
  7. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    The PR is #2701. A Sonnet review is running.

  8. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 2, 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)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions