title: How to add custom HTTP Header to JAX-RS response?
body: <p>I'm trying to add custom HTTP header to response in Apache CXF. I need to count MD5 from content and add it as a HTTP header. I tried to use ResponseHandler or Interceptor. My last try was </p>
  
  <pre><code>@Component
  public class ResponseBPAuthFilter extends AbstractOutDatabindingInterceptor {
  
  
     public ResponseBPAuthFilter() {
         super(Phase.MARSHAL_ENDING);
     }
  
  
     @Override
     public void handleMessage(Message t) throws Fault {
  
         Map headers = CastUtils.cast((Map)t.get(Message.PROTOCOL_HEADERS));
         headers.put("Some-Header", Arrays.asList("test"));
  
     }
  
  }
  </code></pre>
  
  <p>but it does nothing.</p>