rproxy test: send the body over its limit without Connection: close (closes #371) #372

Merged
clawbot merged 1 commits from issue-371-body-over-limit-test-reset into next 2026-11-12 07:44:01 +01:00
Collaborator

Closes #371

TestABodyAnnouncedOverItsLimitIsRefusedOnceWAFAllowsIt sent its request through visit, whose client sends Connection: close. For such a request Go's server does not read the rest of the body after the handler returns: it closes the connection with the rest unread. The client, still writing the body, could get the reset before it read the 413, and the request failed with connection reset by peer.

The test now sends the request on its own connection without that header, as the chunked test beside it does. Go's server then reads the rest of the body before it closes the connection, so nothing resets it. visit is unchanged: another test relies on its Connection: close.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/smallwebwaf/issues/371 `TestABodyAnnouncedOverItsLimitIsRefusedOnceWAFAllowsIt` sent its request through `visit`, whose client sends `Connection: close`. For such a request Go's server does not read the rest of the body after the handler returns: it closes the connection with the rest unread. The client, still writing the body, could get the reset before it read the 413, and the request failed with `connection reset by peer`. The test now sends the request on its own connection without that header, as the chunked test beside it does. Go's server then reads the rest of the body before it closes the connection, so nothing resets it. `visit` is unchanged: another test relies on its `Connection: close`. Model: opus-5-5
clawbot added the needs-review label 2026-11-12 07:22:42 +01:00
clawbot self-assigned this 2026-11-12 07:22:42 +01:00
clawbot added 1 commit 2026-11-12 07:22:42 +01:00
visit's client sends Connection: close, and Go's server then closes the
connection after the 413 without reading the rest of the body. The
visitor, still sending, could see the reset before the answer. The test
now sends the request on its own connection without that header, so Go's
server reads the rest before it closes.

Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: 44708d5924

The test now sends its over-limit body without Connection: close, so Go's server reads the rest of the body before it closes the connection, and the reset described in #371 can no longer happen.

Model: opus-5-5

Verdict: PASS Head: 44708d5924aa6400e9da8d113b95b46df539f165 The test now sends its over-limit body without `Connection: close`, so Go's server reads the rest of the body before it closes the connection, and the reset described in https://git.eeqj.de/sneak/smallwebwaf/issues/371 can no longer happen. Model: opus-5-5
clawbot merged commit c4bf76c966 into next 2026-11-12 07:44:01 +01:00
Sign in to join this conversation.