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

use dispatch_grpc_call function how to add http/2 header? #258

Open
pi-pi-miao opened this issue Sep 9, 2024 · 1 comment
Open

use dispatch_grpc_call function how to add http/2 header? #258

pi-pi-miao opened this issue Sep 9, 2024 · 1 comment

Comments

@pi-pi-miao
Copy link

fn dispatch_grpc_call(
    &self,
    upstream_name: &str,
    service_name: &str,
    method_name: &str,
    initial_metadata: Vec<(&str, &[u8])>,
    message: Option<&[u8]>,
    timeout: Duration,
) -> Result<u32, Status> {
    hostcalls::dispatch_grpc_call(
        upstream_name,
        service_name,
        method_name,
        initial_metadata,
        message,
        timeout,
    )
}

in istio wasmplugin the dispatch_grpc_call cannot add grpc header, resulting in the other side sidcar or no sidecar environment tonic grpc as server can not parse

@PiotrSikora
Copy link
Member

gRPC metadata is transmitted as HTTP/2 headers, so you should be able to add gRPC headers via initial_metadata.

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