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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
