Open bojiangzhou opened 3 years ago
I have the same problem
same problem here
There's nothing at that point that the DedupeResponseHeaderGatewayFilterFactory
or any that modify response headers can do. Maybe log a warning and move on?
Actually I do not understand your point @spencergibb, the question seems reasonable to me.
I had the same problem and I solved putting the responseHeaders' update within the exchange.getResponse().beforeCommit(...);
instead of the classic chain.filter(exchange).then(...);
I'm not sure I haven't broken any "very well hidden secret rule of reactor usage in spring" but it works.
Could you please tell me if I done it right?
Dependent version
1. application.yml
Add one of SetResponseHeader or DedupeResponseHeader under "default-filters"
2. a websocket request
3. exception
4. the reason
When the websocket request is completed, the request will be completed ahead of time.
Then the status of ServerHttpResponse will be changed to COMMITTED.
When finally entering DedupeResponseHeaderGatewayFilterFactory to get HttpHeaders, since the status of ServerHttpResponse is COMMITTED, it returns ReadOnlyHttpHeaders.
Is this a bug, or how to solve it ?