We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0947e9 commit 3d8cac8Copy full SHA for 3d8cac8
Sources/AsyncHTTPClient/HTTPHandler.swift
@@ -387,6 +387,7 @@ public final class ResponseAccumulator: HTTPClientResponseDelegate {
387
/// - precondition: not allowed to exceed 2^32 because ``ByteBuffer`` can not store more bytes
388
public var maxBodySize: Int = maxByteBufferSize {
389
didSet {
390
+ precondition(self.maxBodySize >= 0, "maxBodyLength is not allowed to be negative")
391
precondition(
392
self.maxBodySize <= Self.maxByteBufferSize,
393
"maxBodyLength is not allowed to exceed 2^32 because ByteBuffer can not store more bytes"
0 commit comments