ledgetech / ledgetech/lua-resty-http

Adding simple if not to yield exception.

Open Beginner friendly
#337 0 comments 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/183310324026120ab7eaf5dd82b9be90ae63aadf/lib/resty/http.lua#L797
There are many cases where the header may be nil and it's yielding with un-needed exception.
Should add a simple if before accessing the header.

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 at lib/resty/http.lua around line 797 and inspect the header access described in the issue. Add the nil guard there, then verify that cases with no header no longer raise the unnecessary exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
networking
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.