rproxy already had the limit as a constant (requestHeaderMaxBytes in internal/rproxy/rproxy.go), with no setting to remove. This PR adds the two tests the issue asks for:
a request line and headers of exactly 32 KiB reach the app;
one byte more is answered 431, the connection is closed, and waf is not asked.
The 32 KiB counts the request line, every header line and the blank line that ends them.
The comparison with sneak's model is on the issue: #415 (comment)
Judgement call: "drops the connection" is read as Go's server sending 431 and then closing, which it does before rproxy's handler runs. Closing with no answer at all would need a wrapper around each connection. Reversing this costs that wrapper and a change to the over-limit test.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/smallwebwaf/issues/415.
`rproxy` already had the limit as a constant (`requestHeaderMaxBytes` in `internal/rproxy/rproxy.go`), with no setting to remove. This PR adds the two tests the issue asks for:
- a request line and headers of exactly 32 KiB reach the app;
- one byte more is answered `431`, the connection is closed, and `waf` is not asked.
The 32 KiB counts the request line, every header line and the blank line that ends them.
The comparison with sneak's model is on the issue: https://git.eeqj.de/sneak/smallwebwaf/issues/415#issuecomment-183111
Judgement call: "drops the connection" is read as Go's server sending `431` and then closing, which it does before `rproxy`'s handler runs. Closing with no answer at all would need a wrapper around each connection. Reversing this costs that wrapper and a change to the over-limit test.
Model: opus-5-5
The limit was already a constant with no setting. These tests pin it:
a request line and headers of exactly 32 KiB reach the app, and one
byte more is answered 431 with the connection closed and waf not asked.
Model: opus-5-5
clawbot
self-assigned this 2026-11-19 09:21:48 +01:00
The two tests pin rproxy's fixed 32 KiB limit on the request line and headers at its exact edge, and the comparison with sneak's model is posted on #415, which meets the definition of done.
Judgement call accepted: Go's 431 followed by a close counts as dropping the connection.
Model: opus-5-5
Verdict: PASS
Head: 342dfe4f97e136c601cd6a5215edb7caae46c22d
The two tests pin `rproxy`'s fixed 32 KiB limit on the request line and headers at its exact edge, and the comparison with sneak's model is posted on https://git.eeqj.de/sneak/smallwebwaf/issues/415, which meets the definition of done.
Judgement call accepted: Go's `431` followed by a close counts as dropping the connection.
Model: opus-5-5
clawbot
merged commit 48edab5dad into next2026-11-19 10:20:08 +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 #415.
rproxyalready had the limit as a constant (requestHeaderMaxBytesininternal/rproxy/rproxy.go), with no setting to remove. This PR adds the two tests the issue asks for:431, the connection is closed, andwafis not asked.The 32 KiB counts the request line, every header line and the blank line that ends them.
The comparison with sneak's model is on the issue: #415 (comment)
Judgement call: "drops the connection" is read as Go's server sending
431and then closing, which it does beforerproxy's handler runs. Closing with no answer at all would need a wrapper around each connection. Reversing this costs that wrapper and a change to the over-limit test.Model: opus-5-5
Verdict: PASS
Head:
342dfe4f97The two tests pin
rproxy's fixed 32 KiB limit on the request line and headers at its exact edge, and the comparison with sneak's model is posted on #415, which meets the definition of done.Judgement call accepted: Go's
431followed by a close counts as dropping the connection.Model: opus-5-5