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

kong.response.exit method not implemented #16

Closed
karuppiah7890 opened this issue Jan 5, 2020 · 5 comments
Closed

kong.response.exit method not implemented #16

karuppiah7890 opened this issue Jan 5, 2020 · 5 comments

Comments

@karuppiah7890
Copy link

karuppiah7890 commented Jan 5, 2020

I'm talking about this method here - http://docs.konghq.com/1.4.x/pdk/kong.response/#kongresponseexitstatus-body-headers

I see a TODO here for the same in golang pdk

// TODO exit

I'm interested to analyze and raise a PR if that's okay. In any case, I'm going to try it out. If I back out at any point, I'll report back so that someone else can pick it up 😄

@karuppiah7890
Copy link
Author

@karuppiah7890
Copy link
Author

I could raise a PR if that looks sane. I tried it out and it worked here -

https://github.com/karuppiah7890/kong-plugin-kafka-upstream/blob/master/kafka_upstream.go#L13-L18

I can tell the rationale behind the implementation - it was mostly assumptions though 😅

@gszr
Copy link
Member

gszr commented Jan 6, 2020

@karuppiah7890 PRs are very welcome. Do note however that some PDK methods require special handling - serialization/deserialization mostly - so it's important to check how it works on the Lua side as well (in this case, kong/pdk/response.lua). Thank you for trying out the 2.0 rc1; we will go through all raised issues this week.

@karuppiah7890
Copy link
Author

Closing as fixed in #22

@karuppiah7890
Copy link
Author

Thanks to @javierguerragiraldez ! 😄

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

No branches or pull requests

2 participants