OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.51k stars 1.93k forks source link

Fixed extracting charset from response. #2545

Closed kubav182 closed 2 months ago

kubav182 commented 2 months ago

While building FeignException, ignore quotes in regexp, ignore case and catch IllegalCharsetNameException to be sure it does not raise in other cases.

These content types are all valid and results in utf-8: text/html;charset=utf-8 text/html;charset=UTF-8 Text/HTML;Charset="utf-8" text/html; charset="utf-8"

Fixes #2540

kdavisk6 commented 2 months ago

Please correct the build by running ./mvnw install locally at least once to ensure formatting, test cases, and license requirements.

kubav182 commented 2 months ago

I ran install with toolchain skipped. License header was changed. I also added parametrized test to FeignExceptionTest to cover different cases.

kdavisk6 commented 2 months ago

These changes are approved. We'll leave this PR open for a few more days to allow for additional feedback. If there is none, we'll merge this.

Thanks again for your help!