-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(*): use kong.tools.http.get_header when possible #12463
Conversation
d4ff7af
to
d1376e0
Compare
c6eecfa
to
cea8682
Compare
tools.http.get_header
wherever possible
I run a simple proxy test, the result shows it improves 2.6% in RPS. (test model: link) This pr: 3.6.0.0-rc.3 |
cea8682
to
f65ae8d
Compare
tools.http.get_header
wherever possibletools.http.get_header
when possible
tools.http.get_header
when possible33e6f89
to
a76edd7
Compare
a76edd7
to
ead3ce6
Compare
fb6a383
to
7365fc6
Compare
7365fc6
to
a85e4a8
Compare
Should this PR be released in 3.7? |
a85e4a8
to
4e65356
Compare
Let's try to get it in. It is not a must, but I see no point of post-poning. |
Signed-off-by: Aapo Talvensaari <[email protected]>
Signed-off-by: Aapo Talvensaari <[email protected]>
### Summary Just localizes use of `require("resty.core.base").get_request` instead of importing base and then calling `base.get_request`. Also removes unneeded variables, and unneccessary inclusion of `resty.core.base` on `ldap plugin` `ans1 parser`. Signed-off-by: Aapo Talvensaari <[email protected]>
4e65356
to
1cca687
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job.
Cherry-pick failed for 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: |
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 thengx.ctx.cached_headers
the source for headers whenngx.ctx
is passed toget_header
. And also small change to make "resty.core.base" usage consistent.https://konghq.atlassian.net/browse/KAG-4298