[
https://issues.apache.org/jira/browse/CXF-6544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14935363#comment-14935363
]
Romain Manni-Bucau commented on CXF-6544:
-----------------------------------------
sure, you are totally right, close() override was one test I did and I opened
this issue only cause it was not called which was a surprise. I found nothing i
JAXRS 2 forcing it so this issue can also just be a "doc" thing - that said
having a "end" stream hook is quite missing in JAXRS.
A specific CXF solution for my "real digest issue" would work for me but got a
lot of headache with buffering etc to keep it generic - current workaround is
to force CXF to "bufferize enough" for the payload which is not satisfying.
> OutputStream#close not called for WriterInterceptor
> ---------------------------------------------------
>
> Key: CXF-6544
> URL: https://issues.apache.org/jira/browse/CXF-6544
> Project: CXF
> Issue Type: Bug
> Reporter: Romain Manni-Bucau
>
> Hi
> close() is called later in the JAXRS client lifecycle so no way to add code
> properly at this moment:
> {code}
> ClientBuilder.newBuilder()
> .build()
> .register(new WriterInterceptor() {
> @Override
> public void aroundWriteTo(final WriterInterceptorContext
> writerInterceptorContext) throws IOException, WebApplicationException {
> writerInterceptorContext.setOutputStream(new
> FilterOutputStream(writerInterceptorContext.getOutputStream()) {
> @Override
> public void close() throws IOException {
> // need code here
> super.close();
> }
> });
> }
> })
> {code}
> Overall idea can need more work since i'd like to be able to add a final
> trailer to a HTTP chunk communication.
> Managed to do it with httpclient but I'd like to stick to JAXRS 2 if possible.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)