<div dir="ltr"><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">Hi Undertow dev,</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">I would like to use the RequestBufferingHandler in our proxy application. I found the following in a privious post:</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">&quot;RequestBufferingHandler is a performance enhancing handler that is designed to be used for blocking requests, basically</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">it allows you to fully read the request before the request gets dispatched to a (potentially limited) thread pool.&quot;</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">I have to do the following:</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">- 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.</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">- do some check on the body content</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">- forward the whole request towards the business backend using a proxy handler if the check was successful</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">I use the Undertow with Wildfly, the RequestBufferingHandler cannot be configured in the standalone.xml the error refer an unimplemented constructor.</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">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.</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">Some more detail:</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">- 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.</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">Any help is appreciated.</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace">Regards, Zsolt</div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div class="gmail_default" style="font-family:&quot;courier new&quot;,monospace"><br></div><div id="gmail-m_6878925675556719771DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid rgb(211,212,222)">
        <tbody><tr>
      <td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width:470px;padding-top:17px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Mentes a vírusoktól. <a href="https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a>                 </td>
        </tr>
</tbody></table>
<a href="#m_6878925675556719771_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div></div>