You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/02 12:10:23 UTC
[I] [BUG] WebClient response-header deduplication is overwritten by WebClientMessageWriter [shenyu]
Aias00 opened a new issue, #6557:
URL: https://github.com/apache/shenyu/issues/6557
## Description
`WebClientPlugin.doRequest` deduplicates the upstream response headers and puts them on `exchange.getResponse().getHeaders()`. But later, `WebClientMessageWriter.redrawResponseHeaders` reads the **original** non-deduplicated upstream headers straight from `fluxResponseEntity.getHeaders()` and does `response.getHeaders().putAll(httpHeaders)`. Since `HttpHeaders.putAll` *replaces* each key's value list, the deduped values written by `WebClientPlugin` are overwritten with the full multi-valued upstream headers. The Netty path does not have this regression.
## Location
```
shenyu-plugin-httpclient/.../WebClientPlugin.java:97-100
shenyu-plugin-response/.../WebClientMessageWriter.java:106,121
```
## Impact
Downstream clients receive duplicate response headers despite the retain-first/last/unique configuration; behavior diverges between WebClient and Netty client backends.
## Suggested fix
Perform the response-header dedup inside `redrawResponseHeaders` (on the copy before `putAll`), or have `redrawResponseHeaders` reuse the response headers already set by `WebClientPlugin`.
## Related existing issue(s)
None
_Identified during the 2026-08-02 audit; full list in [`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] WebClient response-header deduplication is overwritten by WebClientMessageWriter [shenyu]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6557:
URL: https://github.com/apache/shenyu/issues/6557#issuecomment-5157754435
👋 Hello @Aias00
A new issue has been opened by @Aias00:
- **Title**: [BUG] WebClient response-header deduplication is overwritten by WebClientMessageWriter
- **Link**: https://github.com/apache/shenyu/issues/6557
Please review when you have time. Thank you! 🙏
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] WebClient response-header deduplication is overwritten by WebClientMessageWriter [shenyu]
Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6557: [BUG] WebClient response-header deduplication is overwritten by WebClientMessageWriter
URL: https://github.com/apache/shenyu/issues/6557
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org