[undertow-dev] Using the RequestBufferingHandler properly

paroczizs . paroczizs at gmail.com
Sun Nov 5 14:02:37 EST 2017


Hi Undertow dev,

I would like to use the RequestBufferingHandler in our proxy application. I
found the following in a privious post:

"RequestBufferingHandler is a performance enhancing handler that is
designed to be used for blocking requests, basically
it allows you to fully read the request before the request gets dispatched
to a (potentially limited) thread pool."



I have to do the following:

- read the full request body or first limit size of the body e.g max 1MB if
larger there is no need for the whole body.
- do some check on the body content
- forward the whole request towards the business backend using a proxy
handler if the check was successful


I use the Undertow with Wildfly, the RequestBufferingHandler cannot be
configured in the standalone.xml the error refer an unimplemented
constructor.
I can clone the RequestBufferingHandler into an own class and I suppose it
works but I am not able to access the bufferd bytes due to the attachment
key belongs HttpServerExchange and the attachment key is package private so
I cannot use it.

Some more detail:

- I also would like to log the full in/out contents with conduits. With
this I got an error if the RequestBufferingHandler registered and fired
before the handler that wants to add the conduits. The problem here that I
need some info from the request in the log (request id / correlation id /
etc.). I can create callbacks towards the own conduit but it is not clear
for me how the conduits and the RequestBufferingHandler work together.

Any help is appreciated.

Regards, Zsolt





<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Mentes
a vírusoktól. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_6878925675556719771_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20171105/61da2d65/attachment-0001.html 


More information about the undertow-dev mailing list