Skip to content

dddpaul/spring-boot-filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot filter examples

CoyoteRequestManipulator

It's used for the same purpose as multiple HTTP connectors. To be exact, when your application handles GET requests containing percent-encoded non-ASCII data in different charsets. For example, one HTTP endpoint uses standard UTF-8 while the other uses Windows-1251.

At this time it's achieved by using private API of org.apache.coyote.Request class to decode query string conditionally.

Implementation is quite simple as you can see from Application.java.

Pros:

  • no multiple connectors, listen on single port;
  • controller unit tests are passed;
  • integration tests are passed.

Cons:

  • reflection and private API usage :)
  • query string could be handled twice.

About

Spring Boot filter examples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published