Resolve placeholders before parsing request headers - #1405
Conversation
Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
049b9e5 to
8c850db
Compare
|
Was there a change that broke this functionality? |
|
I looked through the history, and I couldn't identify a specific change that broke this functionality. It appears that placeholder resolution for header names and values has been supported, but resolving a placeholder for the entire RequestMapping.headers expression was not handled. The existing parsing logic looks for = before resolving the expression, so a value such as ${feignClient.placeholderHeader} is treated as a complete header expression without first being resolved. The existing getHelloHeadersPlaceholders() test has been present since the initial commit, and the history suggests this particular case was not previously supported rather than being broken by a recent change. My change resolves the header expression before parsing it, allowing placeholders that resolve to a complete name=value header expression while preserving the existing behavior for placeholders used within the header name or value. |
Description
Resolves property placeholders in the complete
RequestMapping.headersexpression before parsing the header name and value.Previously, placeholders worked when used as part of a header value: