Compare commits
1 Commits
fe9454f7b3
...
31848922e1
| Author | SHA1 | Date | |
|---|---|---|---|
| 31848922e1 |
25
README.md
25
README.md
@@ -1188,26 +1188,11 @@ entry points directly with the path such a caller would supply.
|
|||||||
Removing either cap fails 14 subtests.
|
Removing either cap fails 14 subtests.
|
||||||
|
|
||||||
`internal/middleware/logbound_test.go` and
|
`internal/middleware/logbound_test.go` and
|
||||||
`internal/handlers/logbound_test.go` drive 8 KB of client-chosen text
|
`internal/handlers/logbound_test.go` drive 8 KB of client-chosen text at
|
||||||
at each of these — 1 KB at `invalid password`, whose accounts are
|
each of these, through both handlers and through every character the
|
||||||
shared with the successful-login line, where a username past 4 KB
|
handlers escape, and hold each line to the 2,560-byte ceiling — and, for
|
||||||
overflows the session cookie and answers 500 before that line is
|
the six rows a request can widen, the whole flood's output to what that
|
||||||
written — through both handlers, and through seven fills: plain text
|
ceiling allows, which is the property an operator actually cares about.
|
||||||
as the baseline, and then the quotation mark, backslash, tab, newline,
|
|
||||||
C0 control and astral non-printable, six characters the wider of the
|
|
||||||
two handlers spends more on than the client spent sending them. Every
|
|
||||||
case holds each line to the 2,560-byte ceiling. That per-line ceiling
|
|
||||||
is what the figure above states, and every row establishes it.
|
|
||||||
|
|
||||||
Three of the sites go further and bound the whole flood's output — the
|
|
||||||
total bytes a run of distinct invented values wrote, which is the
|
|
||||||
shape an operator sizing storage cares about. They are
|
|
||||||
`request body exceeds limit`
|
|
||||||
(`TestMaxBodySize_FloodOfOversizePathsDoesNotGrowTheLog`),
|
|
||||||
`entrypoint not found` and `user not found` (the last two through
|
|
||||||
`assertBoundedFlood`). The other rows carry no aggregate assertion;
|
|
||||||
the per-line ceiling is what they establish.
|
|
||||||
|
|
||||||
`internal/logfield/logfield_test.go` measures the per-rune charge
|
`internal/logfield/logfield_test.go` measures the per-rune charge
|
||||||
against what the handlers really emit, over roughly 3,000 code points on
|
against what the handlers really emit, over roughly 3,000 code points on
|
||||||
each, so an undercharged rune fails a test rather than quietly
|
each, so an undercharged rune fails a test rather than quietly
|
||||||
|
|||||||
Reference in New Issue
Block a user