title: Enabling Jersey trace logging causes MaxHeaderCountExceededException
body: <p>I am trying to debug my jersey 2 app on Payara 162, but on every request, after the trace information is printed I get this exception and the client gets no response:</p>
  
  <pre><code>org.glassfish.grizzly.http.util.MimeHeaders$MaxHeaderCountExceededException: Illegal attempt to exceed the configured maximum number of headers: 100
  at org.glassfish.grizzly.http.util.MimeHeaders.createHeader(MimeHeaders.java:396)
  at org.glassfish.grizzly.http.util.MimeHeaders.addValue(MimeHeaders.java:422)
  at org.glassfish.grizzly.http.HttpHeader.addHeader(HttpHeader.java:707)
  at org.glassfish.grizzly.http.server.Response.addHeader(Response.java:1177)
  at org.apache.catalina.connector.Response.addHeader(Response.java:1221)
  at org.apache.catalina.connector.ResponseFacade.addHeader(ResponseFacade.java:579)
  at org.glassfish.jersey.servlet.internal.ResponseWriter.writeResponseStatusAndHeaders(ResponseWriter.java:165)
  at org.glassfish.jersey.server.ServerRuntime$Responder$1.getOutputStream(ServerRuntime.java:701)
  at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:200)
  at org.glassfish.jersey.message.internal.CommittingOutputStream.flushBuffer(CommittingOutputStream.java:305)
  at org.glassfish.jersey.message.internal.CommittingOutputStream.commit(CommittingOutputStream.java:261)
  at org.glassfish.jersey.message.internal.CommittingOutputStream.close(CommittingOutputStream.java:276)
  at org.glassfish.jersey.message.internal.OutboundMessageContext.close(OutboundMessageContext.java:839)
  at org.glassfish.jersey.server.ContainerResponse.close(ContainerResponse.java:412)
  at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:784)
  at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
  at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
  at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
  </code></pre>
  
  <p>In my jersey I app I configured trace as so:</p>
  
  <pre><code>public class RestApplication extends ResourceConfig {
  
  public RestApplication() {
      super();
      packages(true, "com.example");
      register(JacksonFeature.class);
      register(JsonProvider.class);
      register(RolesAllowedDynamicFeature.class);
  
      property("jersey.config.server.tracing.type", "ON_DEMAND");
      property("jersey.config.server.tracing.threshold", "VERBOSE");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I enabled the logger in my logback.xml (I have configured Payara to use logback), and I see the full trace info in my server log when I enable it on demand by adding the <code>X-Jersey-Tracing-Accept</code> header to my request, but then I get the exception. When I don't add the header to the request everything works but of course I don't get the trace.</p>
  
  <p>I'm wondering if there is anything I can change to fix this or is it a bug?</p>