You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when synchronizing single- and multi-valued header representations of coprocess-based middleware responses (see function syncHeadersAndMultiValueHeaders in gateway/coprocess.go#L608) the list of values for any multi-valued header is replaced by a singleton list (see gateway/coprocess.go#L616) containing only the value given by its single-value representation. Thus, all multi-value header values but the first are effectively dropped. Moreover, as synchronization of multi-value headers is triggered on any change of the map containing single-value representations (see gateway/coprocess.go#L586) all multi-value header values (except the first) are dropped even if those were not even modified.
What is the expected behavior?
Header synchronization should replace only the first value and retain possibly remaining values of multi-valued headers.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
When employing a coprocess (response) middleware to modify the Location header of a redirect response from upstream which also contains multiple Set-Cookie headers only the first Set-Cookie header will be contained in the effective response.
Which versions of Tyk affected by this issue? Did this work in previous versions of Tyk?
We discovered the behaviour with Tyk 5.3. But the mentioned code did not change since then.
The text was updated successfully, but these errors were encountered:
sebkehr
changed the title
multi-value response headers after sync lost with coprocess middleware
Multi-value response headers after sync lost with coprocess middleware
Jul 11, 2024
sebkehr
changed the title
Multi-value response headers after sync lost with coprocess middleware
Multi-value response headers lost after sync with coprocess middleware
Jul 12, 2024
andyo-tyk
changed the title
Multi-value response headers lost after sync with coprocess middleware
[TT-13440] Multi-value response headers lost after sync with coprocess middleware
Oct 30, 2024
Do you want to request a feature or report a bug?
I like to report a (possible) bug.
What is the current behavior?
Currently, when synchronizing single- and multi-valued header representations of coprocess-based middleware responses (see function
syncHeadersAndMultiValueHeaders
in gateway/coprocess.go#L608) the list of values for any multi-valued header is replaced by a singleton list (see gateway/coprocess.go#L616) containing only the value given by its single-value representation. Thus, all multi-value header values but the first are effectively dropped. Moreover, as synchronization of multi-value headers is triggered on any change of the map containing single-value representations (see gateway/coprocess.go#L586) all multi-value header values (except the first) are dropped even if those were not even modified.What is the expected behavior?
Header synchronization should replace only the first value and retain possibly remaining values of multi-valued headers.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
When employing a coprocess (response) middleware to modify the Location header of a redirect response from upstream which also contains multiple Set-Cookie headers only the first Set-Cookie header will be contained in the effective response.
Which versions of Tyk affected by this issue? Did this work in previous versions of Tyk?
We discovered the behaviour with Tyk 5.3. But the mentioned code did not change since then.
The text was updated successfully, but these errors were encountered: