res:read_body() unable to read chunksize
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- lua, nginx
- Domain
- backend, networking
Research direction
Start with res:read_body(), then inspect _chunked_body_reader and _receive_headers, focusing on how sock reads the malformed Sec-Fetch-Site,TE: header line. Reproduce the failure using the response headers in the issue and verify that reading the chunked response body no longer reports an unable to read chunksize error.
Written by the indexing model from the issue text.
Description
响应头包含不符合规范的头信息,导致chunked的响应体获取失败
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: close
Date: Wed, 24 Apr 2024 06:32:55 GMT
Vary: Accept-Encoding
Sso-Version: 1.0
Expires: Wed, 24 Apr 2024 06:32:55 GMT
Cache-Control: max-age=0
Access-Control-Allow-Origin: http://xxx.aaa.com
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Location,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Oidc-Temp-Ticket,Sec-Fetch-Dest,Sec-Fetch-Mode,
Sec-Fetch-Site,TE:
Access-Control-Expose-Headers: Location,Set-Cookie,Content-Type,Content-Length,Content-Range,Oidc-Temp-Ticket
Access-Control-Max-Age: 1728000
在执行_chunked_body_reader时,从sock中读取的第一行数据是:Access-Control-Expose-Headers: Location,Set-Cookie,Content-Type,Content-Length,Content-Range,Oidc-Temp-Ticket
在使用reader读取响应体时,报unable to read chunksize 错误
怀疑是在_receive_headers的时候从sock读取响应头到 Sec-Fetch-Site,TE: 行,发生了错误,结束了读取。 在读取响应体时从异常头的下一行开始读取
- 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