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

ExitArgs.Body should be []byte instead of string #9294

Closed
1 task done
andromedarabbit opened this issue Aug 23, 2022 · 2 comments · Fixed by fffonion/kong-pdk-autogen#3, #9526, Kong/go-pdk#132 or Kong/go-pdk#156
Closed
1 task done

Comments

@andromedarabbit
Copy link

andromedarabbit commented Aug 23, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

2.8.1

Current Behavior

To handle gzipped body content with go-pdk, an encoding error occurs like "string field contains invalid UTF-8 ".

Expected Behavior

To handle any arbitrary sequence of bytes, the type of ExitArgs.body should be bytes instead of string according to https://developers.google.com/protocol-buffers/docs/proto3

string body = 2;

Steps To Reproduce

No response

Anything else?

Without this, PDK is less useful since we can not handle upstream's compressed response.

@StarlightIbuki
Copy link
Contributor

Looks like a fixed bug. I will address it soon.

@StarlightIbuki
Copy link
Contributor

Sorry I misinterpreted your question. You're right, we have the wrong type for this argument. The fix will soon be submitted.

StarlightIbuki added a commit to StarlightIbuki/kong-pdk-autogen that referenced this issue Oct 11, 2022
@chronolaw chronolaw linked a pull request Oct 11, 2022 that will close this issue
fffonion pushed a commit to fffonion/kong-pdk-autogen that referenced this issue Oct 11, 2022
StarlightIbuki added a commit to Kong/go-pdk that referenced this issue Oct 19, 2022
fffonion pushed a commit that referenced this issue Oct 24, 2022
locao pushed a commit that referenced this issue Jun 21, 2024
We are refactoring kong.tools.*, and trying to updating all references of kong.tools.time, which will make our code more clear and easy to maintain.

KAG-3145

(cherry picked from #13093)

Co-authored-by: Chrono <chrono_cpp@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment