-
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
Lua receives empty body on httpCall to GRPC #10048
Comments
I expect you're getting a GRPC error, which is encoded in trailers. Trailers, unfortunately, are not exposed by the Envoy's |
No, the response is fine The request packet is
The response packet is
The body just isn't being returned |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions. |
We're seeing the same underlying issue without GRPC. Can this ticket be reopened so that the entire response body can be accessed in the lua script? |
@mtalbot @james-thomson I have a draft here: #13199, which I believe can solve this issue. However, to be sure, could you try this image: |
Commit Message: This patch lets `httpCall` to return raw data, hence a full response body can be accessed from Lua script. Risk Level: Low Testing: Modify unit test Docs Changes: N/A Release Notes: N/A Fixes #10048 Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
When calling a GRPC service from a lua filter the returned body is always empty. Digging into this I think its related to the response handling code that copies the c++ string to a c string as the body of the http request starts with a null char because the grpc wire format is uncompressed. This doesn't happen though on the request sending, the lua string handles having a null as the first char.
ends up with the following debug print
The text was updated successfully, but these errors were encountered: