-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix the bug that Chinese characters are garbled in ResponseBody of ZuulBlockFallbackProvider #737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...ateway/src/main/java/com/alibaba/csp/sentinel/demo/zuul/gateway/MyBlockFallbackProvider.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #737 +/- ##
============================================
+ Coverage 40.96% 41.02% +0.06%
- Complexity 1335 1337 +2
============================================
Files 301 301
Lines 8630 8631 +1
Branches 1159 1159
============================================
+ Hits 3535 3541 +6
+ Misses 4668 4664 -4
+ Partials 427 426 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for contributing! |
Describe what this PR does / why we need it
Fix the bug that Chinese characters are garbled in ResponseBody of ZuulBlockFallbackProvider.
Does this pull request fix one issue?
Fixes #733
Describe how you did it
Add a line
ctx.getResponse().setContentType("application/json; charset=utf-8");
Describe how to verify it
Custom ZuulBlockFallbackProvider, Set the message field to Chinese,Trigger current limiting,Message field Chinese display is normal
Special notes for reviews
NO