spring-httpserver-timings
spring-httpserver-timings copied to clipboard
"disabled" flag calls doFilter twice
If you set the filter's disabled field to false, the filter will call doFilter twice.
Example:
@Bean
protected TracingFilter tracingServerTimingFilter() {
TracingFilter tracingFilter = new TracingFilter();
tracingFilter.setDisabled(true);
return tracingFilter;
}
This will cause an exception to be thrown too:
Caused by: java.lang.IllegalStateException: getWriter() has already been called for this response
https://github.com/sercasti/spring-httpserver-timings/blob/6140ef2aaefdf533533f202b36e18bd4d31b071c/src/main/java/io/github/sercasti/tracing/filter/TracingFilter.java#L43
Also, after adding this to my application, all my Ajax responses seem to have no content. I'm thinking something's wrong in the HttpServletResponseCopier class.