Package io.servicetalk.encoding.api
Interface ContentCodecBuilder
-
public interface ContentCodecBuilder
Builder forContentCodec
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContentCodec
build()
Build and return an instance of theContentCodec
with the configuration of the builder.ContentCodecBuilder
setMaxAllowedPayloadSize(int maxAllowedPayloadSize)
Sets the maximum allowed decompressed payload size that the codec can process.
-
-
-
Method Detail
-
setMaxAllowedPayloadSize
ContentCodecBuilder setMaxAllowedPayloadSize(int maxAllowedPayloadSize)
Sets the maximum allowed decompressed payload size that the codec can process. This can help prevent malicious attempts to decode malformed payloads that can drain resources of the running instance.- Parameters:
maxAllowedPayloadSize
- the maximum allowed payload size- Returns:
this
- See Also:
- Zip Bomb
-
build
ContentCodec build()
Build and return an instance of theContentCodec
with the configuration of the builder.- Returns:
- the
ContentCodec
with the configuration of the builder
-
-