Skip to content

Commit

Permalink
DT-903 Tomcat no longer appending the wrong charset when left unspeci…
Browse files Browse the repository at this point in the history
…fied for application/json
  • Loading branch information
gj0dcsa authored and nt-gt committed Feb 13, 2024
1 parent 2b0cd1f commit f07bc4a
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.dcsa.conformance.springboot;

import org.apache.catalina.connector.Connector;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConformanceTomcatConfig {

@Bean
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> servletContainerCustomizer() {
return factory ->
factory.addConnectorCustomizers(
(Connector connector) -> connector.setEnforceEncodingInGetWriter(false));
}
}

0 comments on commit f07bc4a

Please sign in to comment.