Skip to content

Commit d127e3f

Browse files
make maxBodyLength consistent with comment
1 parent 1343210 commit d127e3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

checks/http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ func prettyPrintHTTPTest(test api.HTTPRequestTest, variables map[string]string)
163163
}
164164

165165
// in some lessons we yeet the entire body up to the server, but we really shouldn't ever care
166-
// about more than 100,000 stringified characters of it, so this protects against giant bodies
166+
// about more than 256 KiB of UTF-8 data, so this protects against giant bodies
167167
func truncateAndStringifyBody(body []byte) string {
168168
if likelyBinary(body) {
169169
return fmt.Sprintf("<likely binary data: %d bytes>", len(body))
170170
}
171171
bodyString := string(body)
172-
const maxBodyLength = 1000000
172+
const maxBodyLength = 256 * 1024
173173
if len(bodyString) > maxBodyLength {
174174
bodyString = bodyString[:maxBodyLength]
175175
}

0 commit comments

Comments
 (0)