apache / apache/apisix-go-plugin-runner
bug: pkgHTTP.Request RespHeader() Add override previous value
- Dominant language
- Go
- Stars
- 198
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
### Issue description
```
w http.ResponseWriter, r pkgHTTP.Request
r.RespHeader().Add("Set-Cookie","a=a; Expires=Wed, 21 Oct 2023 07:28:00 GMT; Secure; HttpOnly")
r.RespHeader().Add("Set-Cookie","b=b; Expires=Wed, 21 Oct 2023 07:28:00 GMT; Secure; HttpOnly")
```
Cookie `a` is missing in the response header
### Environment
* APISIX Go Plugin Runner's version: dee7fa0167af0ed8cdcd87d4321a43b194f2a7ed
* APISIX version: 2.13.0
* Go version: 1.18
* OS (cmd: `uname -a`): centos
### Minimal test code / Steps to reproduce the issue
1. Start APISIX on docker
2. Set Plugin filter codes
```
Filter(conf interface{}, w http.ResponseWriter, r pkgHTTP.Request)
{
r.RespHeader().Add("Set-Cookie","a=a; Expires=Wed, 21 Oct 2023 07:28:00 GMT; Secure; HttpOnly")
r.RespHeader().Add("Set-Cookie","b=b; Expires=Wed, 21 Oct 2023 07:28:00 GMT; Secure; HttpOnly")
return
}
```
4. Cookie `a` is missing in the response header
### What's the actual result? (including assertion message & call stack if applicable)
Cookie `b` can be found, Cookie `a` is missing
### What's the expected result?
Both cookie `a` and `b` could be found
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.