apache / apache/apisix-java-plugin-runner

bug: ext-plugin-post-resp can't get duplicate headers from upstream response, such as Set-Cookie

Đang mở
#262 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
152
Fork
102
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Environment

* 0.4.0

### Steps to reproduce the issue
1. use `ext-plugin-post-resp` `postFilter(PostRequest request, PostResponse response, PluginFilterChain chain)`
2. use `request.getUpstreamHeaders()` to get headers
3. upstream response
```
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sat, 19-Aug-2023 05:45:05 GMT
Set-Cookie: JSESSIONID=deleteMe; Path=/; Max-Age=0; Expires=Sat, 19-Aug-2023 05:45:05 GMT
Set-Cookie: JSESSIONID=0bc8714b-e1bf-4077-baaa-b94c8ba10a05; Path=/; HttpOnly
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sat, 19-Aug-2023 05:45:05 GMT
```
### What's the actual result? (including assertion message & call stack if applicable)
just get the last Set-Cookie item `Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sat, 19-Aug-2023 05:45:05 GMT`

### What's the expected result?

1. can get duplicate headers with `Multimap` data structure
2. can set duplicate headers

### One more thing!
It is recommended that ext-plugin-post-resp inherits all the headers of upstream by default, so you don't need to write them again in the plugin.

eg:
1. upstream return content-type = text/html
2. empty code in `postFilter(PostRequest request, PostResponse response, PluginFilterChain chain)`
3. the client get content-type = text/pain

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.