refactor(*): use kong.tools.http.get_header when possible
Summary
Just a small change to use the new tools.http.get_header in rest of the places. There is additional performance commit that makes the ngx.ctx.cached_headers the source for headers when ngx.ctx is passed to get_header.
I run a simple proxy test, the result shows it improves 2.6% in RPS. (test model: link)
This pr:
Requests/sec: 12024.57
Requests/sec: 11709.28
Requests/sec: 12027.06
avg: 11920.30
3.6.0.0-rc.3 Requests/sec: 11446.50 Requests/sec: 11775.31 Requests/sec: 11629.49 avg: 11617.09
Should this PR be released in 3.7?
Should this PR be released in 3.7?
Let's try to get it in. It is not a must, but I see no point of post-poning.
Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally.
git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12463-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12463-to-master-to-upstream
git checkout -b cherry-pick-12463-to-master-to-upstream
ancref=$(git merge-base e7159cae979b8fde91b8bf70cd529da2af124908 1cca6874a3ecd6c0841a6b2c6f1f0cc374fbf8f3)
git cherry-pick -x $ancref..1cca6874a3ecd6c0841a6b2c6f1f0cc374fbf8f3
I am removing incomplete-cherry-pick as there is now manual one: https://github.com/Kong/kong-ee/pull/8863