<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks Stuart,<div><br></div><div>this works very well. For future reference this is our implementation of the modifiable conduit <a href="https://github.com/SoftInstigate/uiam/blob/master/src/main/java/io/uiam/handlers/ModifiableContentSinkConduit.java">https://github.com/SoftInstigate/uiam/blob/master/src/main/java/io/uiam/handlers/ModifiableContentSinkConduit.java</a></div><div><br></div><div>We use it to modify both the request and the response for a proxied resource (via ProxyHandler and LoadBalancingProxyClient). In order to get the plain response to modify it without the need of decod it, we force the Accept-Encoding=identity before proxying it. However we are struggling encoding it according to the original Accept-Encoding after our ModifiableContentSinkConduit.terminateWrites() executes.</div><div><br></div><div>We thought to set the Accept-Encoding back to its original value and use the EncodingHandler, however the fact that we overwrite the header seems to mess things. Do you have any suggestions? </div><div><br></div><div>Thanks,</div><div> Andrea</div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 22 feb 2019 alle ore 13:25 Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com">sdouglas@redhat.com</a>&gt; ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">io.undertow.server.HttpServerExchange#addResponseWrapper lets you add a conduit that can modify the response.<br></div><div dir="ltr"><br></div><div>Stuart</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 22, 2019 at 11:13 PM Andrea Di Cesare &lt;<a href="mailto:andrea@softinstigate.com" target="_blank">andrea@softinstigate.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev</a>,</div><div dir="ltr"><br></div><div dir="ltr">I&#39;m using ProxyHandler with LoadBalancingProxyClient and in some cases I need to modify the response content received from the backed before sending it to the client.</div><div dir="ltr"><br></div><div>HttpServerExchange.addResponseCommitListener() allows to modify the response and using it I&#39;m able, for instance, to add a response header but not modifyng the content from the backend since it is not available.</div><div><br></div><div>Is it possible? What are the suggested ways of implementing this behavior?</div><div><br></div><div>Thanks,</div><div> Andrea Di Cesare</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></blockquote></div>
</blockquote></div></div>