aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Quarendon (JIRA)" <>
Subject [jira] [Created] (ARIES-1867) ContainerResponseFilter not fired for SSE endpoint
Date Sun, 25 Nov 2018 17:22:00 GMT
Tom Quarendon created ARIES-1867:

             Summary: ContainerResponseFilter not fired for SSE endpoint
                 Key: ARIES-1867
             Project: Aries
          Issue Type: Bug
          Components: jax-rs-whiteboard
            Reporter: Tom Quarendon

I have a resource class such as the following:
public class EventsResource {

  private Sse sse;
  private SseBroadcaster eventBroadcaster;

  public void setSse(Sse sse) {
    this.sse = sse;
    this.eventBroadcaster = sse.newBroadcaster();

  public void suscribeToEvents(@Context SseEventSink eventSink) {



In addition, I have a CORS filter:

public class CORSFilter implements ContainerResponseFilter {

  public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
throws IOException {
    System.out.println("CORSFilter for "+requestContext.getUriInfo().getPath());
    MultivaluedMap<String, Object> headers = responseContext.getHeaders();

    headers.add("Access-Control-Allow-Origin", requestContext.getHeaderString("Origin"));


The CORS filter gets fired on all requests as I expect, _except_ for ones to the EventResource.subscribeToEvents
method. Hence browsers complain when receiving SSE events.

This used to work fine with jersey as the JAXRS implementation. CORS filter got called for
the EventsResource.subscribeToEvents call.

I've no idea whether this is a jaxrs-whiteboard level issue, or a CXF level issue. I will
try and come up with a plain CXF test of the same thing for comparison.


This message was sent by Atlassian JIRA

View raw message