[ 
https://issues.apache.org/jira/browse/CXF-8544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17359294#comment-17359294
 ] 

Timothy James Ward commented on CXF-8544:
-----------------------------------------

The problem seems to come from the SseInterceptor 
[https://github.com/apache/cxf/blob/fe96f67d273680c711b940a9ac4c6a369243a5c5/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/interceptor/SseInterceptor.java#L76-L84|https://github.com/apache/cxf/blob/fe96f67d273680c711b940a9ac4c6a369243a5c5/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/interceptor/SseInterceptor.java#L76-L84]
 - these lines copy the *request* headers into the response. As my request has 
a` Content-Length` of `2` (from the POST body) this limits my response to two 
characters!

> SseEventSink cannot be used in a @POST resource method
> ------------------------------------------------------
>
>                 Key: CXF-8544
>                 URL: https://issues.apache.org/jira/browse/CXF-8544
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.2.14
>            Reporter: Timothy James Ward
>            Assignee: Andriy Redko
>            Priority: Major
>
> It is possible (and legal according to the JAX-RS specification) to inject a 
> SseEventSink into a resource method annotated with @POST. This works, but the 
> Server Sent Event stream gets automatically closed after the first event is 
> sent. This prevents any @POST resource method from sending Server Sent Events 
> using the API.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to