bug: wrong trailer format parsing
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- lua
- Domain
- api, networking
Research direction
Inspect the chunked-body trailer parsing in lib/resty/http.lua around lines 486-489 and the existing cases in t/04-trailers.t around lines 79-86. Run the trailer tests first, then verify parsing against the HTTP Trailer format shown in the issue. Done means the first trailer header is preserved rather than losing its first two characters.
Written by the indexing model from the issue text.
Description
The trailer headers should be in the following format:
...<body>...
0\r\n
Trailer-Header-A: foo\r\n
...
\r\n
However, the code thought there is an extra \r\n between 0\r\n and Trailer-Header-A: foo\r\n, so it consumes two more chars from the first header at the end of chunked body parsing, then the first parsed header becomes a truncated version: ailer-Header-A: foo\r\n.
- Dominant language
- Lua
- Stars
- 2.1k
- Forks
- 630
- PR merge metrics
- No merged PRs in 30d
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.
More from ledgetech/lua-resty-http
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
ledgetech/lua-resty-http#337 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ledgetech/lua-resty-http#334 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ledgetech/lua-resty-http#330 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
ledgetech/lua-resty-http#325 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ledgetech/lua-resty-http#324 ·
All issues in ledgetech/lua-resty-http
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
api7/lua-resty-saml#62 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nvim-tree/nvim-tree.lua#3357 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
codymikol/multiverse.nvim#320 ·
-
Data Correction tbc
Difficulty 2/5 1-3 hours Newbie friendliness 68/100