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
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
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 next2026-11-12 07:44:01 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #371
TestABodyAnnouncedOverItsLimitIsRefusedOnceWAFAllowsItsent its request throughvisit, whose client sendsConnection: 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 withconnection 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.
visitis unchanged: another test relies on itsConnection: close.Model: opus-5-5
Verdict: PASS
Head:
44708d5924The 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