Package com.io7m.idstore.server.internal
Class IdRequestLimits
java.lang.Object
com.io7m.idstore.server.internal.IdRequestLimits
- All Implemented Interfaces:
IdServiceType
Methods to handle request size limits.
-
Constructor Summary
ConstructorsConstructorDescriptionIdRequestLimits(IdServerStrings inStrings) Methods to handle request size limits. -
Method Summary
Modifier and TypeMethodDescriptionboundedMaximumInput(jakarta.servlet.http.HttpServletRequest request, int 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:
inStrings- Server string resources
-
-
Method Details
-
boundedMaximumInput
public InputStream boundedMaximumInput(jakarta.servlet.http.HttpServletRequest request, int maximum) throws IOException, IdHTTPErrorStatusException 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:
IOException- On errorsIdHTTPErrorStatusException- On errors
-
description
- Specified by:
descriptionin interfaceIdServiceType- Returns:
- The service description
-
toString
-