[Bug]: Cookie处理不正确
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 241
- PR merge metrics
- No merged PRs in 30d
Description
### 依赖环境:
Java: JDK21
Forest: version: 1.8.0
Backend: okhttp/3
SpringBoot: version: 3.5.5
### 问题简述:
上游返回的cookie包含`JSESSIONID`,会被框架判定为无效cookie,我感觉框架不要限制cookie中到底会放入什么内容,我通过直接添加header参数的方式,也会被forest识别到该参数是否为cookie,然后构造为forest的cookie对象,这是否会导致cookie的内容并不是我想要的?
### 如何复现:
1. ...
2. ...
3. ...
### 预期结果:
我希望我直接添加header参数的时候,框架不要干预我添加的内容,直接放入header头即可
### 实际结果:
目前的情况是:
1. forest会检测cookie的内容是否为限定的内容
2. 通过直接添加header参数的方式也无法绕过,forest会检查header参数是否为cookie,然后又构造自己的cookie对象
### 截图或视频:
_No response_
### 最小可复现代码:
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the request with JDK 21, Forest 1.8.0, Spring Boot 3.5.5, and the okhttp/3 backend. Trace how an upstream JSESSIONID and a directly supplied Cookie header are recognized and converted; done means the cookie content is preserved and the supplied header is passed through unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100