ledgetech / ledgetech/lua-resty-http

request_uri() lost Trailer?

Open
#269 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2.1k
Forks
630
PR merge metrics
No merged PRs in 30d

Description

https://github.com/ledgetech/lua-resty-http/blob/2af9925acf5cbb5b387539cd4463552ebbd5efee/lib/resty/http.lua#L937-L950

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.