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:09:26 UTC
[I] [BUG] WebClient request-header deduplication is a no-op (feature broken on the WebClient path) [shenyu]
Aias00 opened a new issue, #6543:
URL: https://github.com/apache/shenyu/issues/6543
## Description
`doRequest` builds a deduplicated copy of the request headers (`httpHeaders`, lines 62-63) via `duplicateHeaders(..., REQ_UNIQUE_HEADER)`. But the outbound request is then populated from `exchange.getRequest().getHeaders()` — the **original, non-deduplicated** headers — via `headers.addAll(exchange.getRequest().getHeaders())` (line 67). The `httpHeaders` variable is computed and thrown away; it is never used to build the request. The sibling `NettyHttpClientPlugin.java:72` correctly applies the deduped copy via `httpHeaders.forEach(headers::set)`.
## Location
```
shenyu-plugin-httpclient/.../WebClientPlugin.java:62-67
NettyHttpClientPlugin.java:72 (correct)
```
## Impact
The "unique header" feature is silently inactive on the WebClient path while it works on the Netty path — inconsistent behavior depending on which HTTP client is configured. Upstream servers that reject duplicate headers (or pick the wrong value) will misbehave, and the configured retain-first/last/unique policy is ignored.
## Suggested fix
In the `WebClientPlugin` headers lambda, replace `headers.addAll(exchange.getRequest().getHeaders())` with `httpHeaders.forEach(headers::set)` (mirroring `NettyHttpClientPlugin`).
## Related existing issue(s)
#6255/#6254 (closed) were about request-template custom headers; this is the dedup result being discarded entirely, distinct.
_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 request-header deduplication is a no-op (feature broken on the WebClient path) [shenyu]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6543:
URL: https://github.com/apache/shenyu/issues/6543#issuecomment-5157750979
👋 Hello @Aias00
A new issue has been opened by @Aias00:
- **Title**: [BUG] WebClient request-header deduplication is a no-op (feature broken on the WebClient path)
- **Link**: https://github.com/apache/shenyu/issues/6543
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 request-header deduplication is a no-op (feature broken on the WebClient path) [shenyu]
Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6543: [BUG] WebClient request-header deduplication is a no-op (feature broken on the WebClient path)
URL: https://github.com/apache/shenyu/issues/6543
--
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 request-header deduplication is a no-op (feature broken on the WebClient path) [shenyu]
Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 commented on issue #6543:
URL: https://github.com/apache/shenyu/issues/6543#issuecomment-5930763467
Closing as fixed by #7252. `WebClientPlugin` now applies outbound request-header deduplication on the WebClient path.
--
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