Class IdRequestLimits
java.lang.Object
com.io7m.idstore.server.service.reqlimit.IdRequestLimits
- All Implemented Interfaces:
com.io7m.repetoir.core.RPServiceType
Methods to handle request size limits.
-
Constructor Summary
ConstructorDescriptionIdRequestLimits
(Function<Long, String> inRequestTooLargeMessage) Methods to handle request size limits. -
Method Summary
Modifier and TypeMethodDescriptionboundedMaximumInput
(io.helidon.webserver.http.ServerRequest request, long maximum) Bound the given servlet request to the given maximum size, raising an exception if the incoming Content-Length is larger than this size.toString()
-
Constructor Details
-
IdRequestLimits
Methods to handle request size limits.- Parameters:
inRequestTooLargeMessage
- A function that formats a message
-
-
Method Details
-
boundedMaximumInput
public InputStream boundedMaximumInput(io.helidon.webserver.http.ServerRequest request, long maximum) throws IdRequestLimitExceeded Bound the given servlet request to the given maximum size, raising an exception if the incoming Content-Length is larger than this size.- Parameters:
request
- The requestmaximum
- The maximum size- Returns:
- A bounded input stream
- Throws:
IdRequestLimitExceeded
- On errors
-
description
- Specified by:
description
in interfacecom.io7m.repetoir.core.RPServiceType
-
toString
-