Hi Stuart,

i am new to Undertow code, Can you please elaborate.

yes, The exchange will be passed to the ResponseCommitListener, but From exchange i cannot get the response content directly ,correct? as there is no method to get the Response body like getResponseHeaders.

so i would need something like  a conduit inside my ResponseCommitListener to get a handle on the response content?
Any other straight forward way to get the response content using exchange object?

Thanks for all the help.


On Mon, Feb 27, 2017 at 3:50 PM, Stuart Douglas <sdouglas@redhat.com> wrote:
You have access to the exchange, it is passed into the ResponseCommitListener.

Stuart

On Mon, Feb 27, 2017 at 4:25 PM, Rohan Emmanuel
<rohan.emmanuel07@gmail.com> wrote:
> hi Stuart,
> I have a ResponseCommitListener added to my handler, I want this to write to
> the cache, so that my reponseWrapper will take of the error handling if the
> ResponsecommitListener faces any error while storing the response to cache.
>
> I understand HttpResponseConduit constructs the headers and then pushes the
> response.
> But the confusion is, how will i get a access to response Headers and body
> in the my ResponseCommitListener?
>
>
> My approach is valid? if not ,any suggestion?
>
>
> On Mon, Feb 27, 2017 at 8:03 AM, Stuart Douglas <sdouglas@redhat.com> wrote:
>>
>> Whatever code is writing to the cache needs to just hold onto the
>> exchange and send an error response as required.
>>
>> Stuart
>>
>> On Fri, Feb 24, 2017 at 5:31 PM, Rohan Emmanuel
>> <rohan.emmanuel07@gmail.com> wrote:
>> > Hi,
>> > i had a similar query, i want to store the entire response for my book
>> > keeping , before it is flush out on to socket connection.
>> > if while storing the response(using a cache to store) any IO error
>> > occurs ,
>> > i want to send out 500 error instead.
>> >
>> > Any thoughts on how can this be achieved?
>> >
>> >
>> > --
>> > Regards,
>> > Rohan Emmanuel
>> >
>> > _______________________________________________
>> > undertow-dev mailing list
>> > undertow-dev@lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/undertow-dev
>> _______________________________________________
>> undertow-dev mailing list
>> undertow-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
>
>
>
> --
> Regards,
> Rohan Emmanuel
_______________________________________________
undertow-dev mailing list
undertow-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev



--
Regards,
Rohan Emmanuel