Skip to content
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

fix(external-plugins) response.getXXX() functions from log phase #7048

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

javierguerragiraldez
Copy link
Contributor

The kong.response.get_XXX() functions require data from the response
object, which is no longer accessible in the "post-log" timer used to
call Log handlers in external plugins.

This patch allows those functions to work by adding the required data to
the set saved at the start of the "real" log phase.

Fix Kong/go-pdk#61

The `kong.response.get_XXX()` functions require data from the response
object, which is no longer accessible in the "post-log" timer used to
call Log handlers in external plugins.

This patch allows those functions to work by adding the required data to
 the set saved at the start of the "real" log phase.
@locao locao force-pushed the fix/response-data-after-log branch from 4e4e1ed to 68ac60b Compare April 16, 2021 15:52
Copy link
Member

@dndx dndx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, otherwise LGTM.

kong/runloop/plugin_servers/init.lua Outdated Show resolved Hide resolved
kong/runloop/plugin_servers/init.lua Outdated Show resolved Hide resolved
The only difference is that under MessagePack, headers and decoded query
results must be "fixed" to get the right MP structure.
@dndx dndx merged commit 9113854 into master Apr 20, 2021
@dndx dndx deleted the fix/response-data-after-log branch April 20, 2021 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no phase in kong.ctx.core.phase
2 participants