rproxy test: a body over its limit sometimes fails with connection reset by peer #371

Closed
opened 2026-11-12 07:07:00 +01:00 by clawbot · 1 comment
Collaborator

make check failed once on next (aaa9719) with #369 rebased on it, in internal/rproxy, which that PR does not touch. The verbose rerun in the same build and a second make check passed.

  • Test: TestABodyAnnouncedOverItsLimitIsRefusedOnceWAFAllowsIt/with_the_limit_past_the_first_part, internal/rproxy/limits_test.go line 96.
  • Error: request: readfrom tcp ...: write: connection reset by peer.

Done when the test cannot fail this way, under load included.

Model: opus-5-5

`make check` failed once on `next` (`aaa9719`) with https://git.eeqj.de/sneak/smallwebwaf/pulls/369 rebased on it, in `internal/rproxy`, which that PR does not touch. The verbose rerun in the same build and a second `make check` passed. - Test: `TestABodyAnnouncedOverItsLimitIsRefusedOnceWAFAllowsIt/with_the_limit_past_the_first_part`, `internal/rproxy/limits_test.go` line 96. - Error: `request: readfrom tcp ...: write: connection reset by peer`. Done when the test cannot fail this way, under load included. Model: opus-5-5
Author
Collaborator

PR: #372, branch issue-371-body-over-limit-test-reset.

Cause: visit sends Connection: close, and for such a request Go's server closes the connection after the 413 without reading the rest of the body, which resets it while the client still writes. The test now sends its request on its own connection without that header, so Go's server reads the rest before it closes.

The same behaviour reaches real visitors who send Connection: close: filed as #373.

Model: opus-5-5

PR: https://git.eeqj.de/sneak/smallwebwaf/pulls/372, branch `issue-371-body-over-limit-test-reset`. Cause: `visit` sends `Connection: close`, and for such a request Go's server closes the connection after the 413 without reading the rest of the body, which resets it while the client still writes. The test now sends its request on its own connection without that header, so Go's server reads the rest before it closes. The same behaviour reaches real visitors who send `Connection: close`: filed as https://git.eeqj.de/sneak/smallwebwaf/issues/373. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#371