You need to implement org.xnio.conduits.StreamSinkConduit and add
io.undertow.server.HttpServerExchange#addResponseWrapper
There is no simple in memory representation of the response, because it may be to large
for the server to buffer (or more likely the server does not want to buffer it for
performance reasons). Implementing this will allow you to modify the response as it is
being written.
Stuart
----- Original Message -----
From: "Geisselmann Benno (INST/ECS1)"
<Benno.Geisselmann(a)bosch-si.com>
To: undertow-dev(a)lists.jboss.org
Sent: Friday, 4 March, 2016 2:09:14 AM
Subject: [undertow-dev] Change response body in Undertow
Hi,
Can you tell me, whether it is possible to change the Body of a request
response (within HttpServerExchange) if this response has already been
created by another handler? I saw that I can change for example the response
status code, but it seems like I cannot change the response body.
Thanks for your help.
Benno Geißelmann
Bosch Software Innovations GmbH
www.blog.bosch-si.com
www.bosch-si.de
benno.geisselmann(a)bosch-si.com
Registered office: Berlin, Register court: Amtsgericht Charlottenburg; HRB
148411 B ;
Executives: Dr.-Ing. Rainer Kallenbach, Michael Hahn
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev