spring-cloud-netflix icon indicating copy to clipboard operation
spring-cloud-netflix copied to clipboard

Proper handling for Content-Encoding and String response body

Open jebeaudet opened this issue 5 years ago • 4 comments

Following up on #3680 since I messed it up there sorry.

Fixes gh-3679

jebeaudet avatar Jan 14 '20 15:01 jebeaudet

Codecov Report

Merging #3734 (7cdbe6d) into 2.2.x (67444a0) will increase coverage by 0.03%. The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##              2.2.x    #3734      +/-   ##
============================================
+ Coverage     65.88%   65.92%   +0.03%     
- Complexity     1591     1593       +2     
============================================
  Files           203      203              
  Lines          7455     7457       +2     
  Branches        876      877       +1     
============================================
+ Hits           4912     4916       +4     
+ Misses         2224     2223       -1     
+ Partials        319      318       -1     
Impacted Files Coverage Δ Complexity Δ
.../netflix/zuul/filters/post/SendResponseFilter.java 80.92% <75.00%> (+0.25%) 41.00 <0.00> (+1.00)
...etflix/turbine/stream/HystrixStreamAggregator.java 78.94% <0.00%> (+5.26%) 9.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 67444a0...7cdbe6d. Read the comment docs.

codecov[bot] avatar Jan 14 '20 16:01 codecov[bot]

Sorry for the long delay. This needs to be submitted on the 2.2.x branch. I'm a little worried that existing tests needed to be changed for this to work. Can you explain why you had to change them?

spencergibb avatar Apr 09 '20 00:04 spencergibb

@spencergibb I've updated the base branch

The fix I made showed that some of the UTs were improperly coded in the first place. When testing against the client response data stream, you need to specify true in the createFilter method otherwise it was setting the content in the "override" body.

FWIW, I've been running this version of the filter for ~6 months in production with no issue.

jebeaudet avatar Apr 29 '20 14:04 jebeaudet

Closing due to lack of feedback

jebeaudet avatar Jan 18 '21 18:01 jebeaudet