Package org.restheart.handlers.injectors
Class RequestContentInjector
java.lang.Object
org.restheart.handlers.PipelinedHandler
org.restheart.handlers.injectors.RequestContentInjector
- All Implemented Interfaces:
io.undertow.server.HttpHandler
injects in the exchange the request content if the request involves a Service
or a Request Interceptor whose requiresContent() returns true
Note that getting the content has significant performance overhead for
proxied resources. To mitigate DoS attacks the injector limits the size of
the content to MAX_CONTENT_SIZE bytes
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.restheart.handlers.PipelinedHandler
CONTENT_TYPE -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRequest(io.undertow.server.HttpServerExchange exchange) protected voidsetNext(PipelinedHandler next) Methods inherited from class org.restheart.handlers.PipelinedHandler
getNext, next, pipe
-
Constructor Details
-
RequestContentInjector
- Parameters:
next-policy- set the injection policy
-
RequestContentInjector
- Parameters:
policy- set the injection policy
-
-
Method Details
-
setNext
- Overrides:
setNextin classPipelinedHandler
-
handleRequest
- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Specified by:
handleRequestin classPipelinedHandler- Parameters:
exchange-- Throws:
Exception
-