Skip to content

Spring Web filter for logging request and response / forked gist.github.com/int128/e47217bebdb4c402b2ffa7cc199307ba

License

Notifications You must be signed in to change notification settings

LinfinyJapan/RequestAndResponseLoggingFilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RequestAndResponseLoggingFilter

Forked "Spring Web filter for logging request and response".

original gist https://gist.github.com/int128/e47217bebdb4c402b2ffa7cc199307ba

probrem

The original had a problem with garbled characters in json. The reason is follows.

  • RFC8259 requires UTF-8 encoding for JSON
  • Accordingly, no character set is specified for Content-Type: application/json
  • Spring Boot has also changed in that way since 2.2
  • In the original "RequestAndResponseLoggingFilter.java", if the character set is not specified, it will be ISO-8859-1.

changes

Changed to consider ISO-8859-1(Latain-1) as UTF-8 when Content-Type: application/json.

About

Spring Web filter for logging request and response / forked gist.github.com/int128/e47217bebdb4c402b2ffa7cc199307ba

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages