Skip to content

Response body in the failure dump is truncated at 256 bytes with no marker #92

Description

@korya

Problem

The response dump cuts the body at 256 bytes and gives the reader no indication it did so. The output simply stops mid-body.

Reproduction

$ http-assert --assert-body 'zzz' http://127.0.0.1:8099/large 2>&1 | sed -n '23p' | wc -c
     257

The line ends with xxxx and nothing else — no , no << truncated >>.

Why it matters

A reader cannot tell whether the body genuinely ended there or was cut, which matters exactly when they are eyeballing a dump to work out why an assertion failed. The codebase already has a marker for the analogous case — << Payload is omitted >> appears when the payload is suppressed at error level — so the inconsistency is internal, not just cosmetic.

Suggested fix

Append a marker naming the elision, e.g. << 99744 more bytes >>, matching the existing << Payload is omitted >> wording.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions