新请求直接设置Session内容会失败
Open
Nobody has claimed this yet.
session
- Dominant language
- JavaScript
- Stars
- 5.3k
- Forks
- 614
- PR merge metrics
- No merged PRs in 30d
Description
DESC
ENV
OS Platform: Mac
Node.js Version: 6.10
ThinkJS Version: 3
code
this.session('key', {content});
more description
登录接口,用CURL直接测试,会发现session要保存的内容没有存到redis里(或file里,看了一下源码两边逻辑一样),问题应该出在对fresh的判断这块
if(this.options.fresh || this.status === -1){
return this.initPromise = Promise.resolve();
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the login request with CURL using this.session('key', {content}) and inspect the session initialization path containing the shown fresh/status guard. Compare the Redis and file storage behavior, then verify that newly set session content is persisted and available after the request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100