ledgetech / ledgetech/lua-resty-http
request_uri() lost Trailer?
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 2.1k
- Forks
- 630
- PR merge metrics
- No merged PRs in 30d
Description
In function request_uri(), we read response body by res:read_body(), but Trailer is not be read before closing connection I think.
Correct me if I am wrong~
Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer
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
Start in lib/resty/http.lua around lines 937-950 and inspect how request_uri() calls res:read_body() before closing the connection. Check the HTTP Trailer semantics in the linked MDN reference and determine whether the response trailers are available before closure; done means the behavior is confirmed and covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100