spring-cloud/spring-cloud-openfeign
Resolve placeholders before parsing request headers
Contribution Overview
The Engineering Context
This contribution was made to the spring-cloud/spring-cloud-openfeignopen-source repository. The work involved understanding the existing codebase, identifying the underlying engineering problem, implementing a focused solution, and validating the change against the project's existing behaviour and testing standards.
Engineering Problem
Understanding the Problem
Spring Cloud OpenFeign resolved placeholders used inside individual header names or values, but did not resolve a placeholder representing the complete RequestMapping.headers expression before parsing it. As a result, a configuration value that resolved to a complete name=value header expression could not be handled correctly.
Solution
Implementation Approach
Updated the header parsing flow to resolve the complete header expression before locating and parsing the equals separator. Added regression coverage for a placeholder that resolves to an entire name=value RequestMapping header expression while preserving the existing placeholder behaviour.
Technologies
Engineering Stack
Pull Request
View the Contribution
View the pull request and the associated engineering discussion directly on GitHub.
View Pull Request on GitHub →