Skip to content

Commit b0c311e

Browse files
committed
Allow arbitrary bytes as upstream name of grpc call
Signed-off-by: Michał Krasnoborski <[email protected]>
1 parent 375a366 commit b0c311e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/hostcalls.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ extern "C" {
793793
}
794794

795795
pub fn dispatch_grpc_call(
796-
upstream_name: &str,
796+
upstream: &[u8],
797797
service_name: &str,
798798
method_name: &str,
799799
initial_metadata: Vec<(&str, &[u8])>,
@@ -804,8 +804,8 @@ pub fn dispatch_grpc_call(
804804
let serialized_initial_metadata = utils::serialize_map_bytes(initial_metadata);
805805
unsafe {
806806
match proxy_grpc_call(
807-
upstream_name.as_ptr(),
808-
upstream_name.len(),
807+
upstream.as_ptr(),
808+
upstream.len(),
809809
service_name.as_ptr(),
810810
service_name.len(),
811811
method_name.as_ptr(),

src/traits.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ pub trait Context {
116116

117117
fn dispatch_grpc_call(
118118
&self,
119-
upstream_name: &str,
119+
upstream: &[u8],
120120
service_name: &str,
121121
method_name: &str,
122122
initial_metadata: Vec<(&str, &[u8])>,
123123
message: Option<&[u8]>,
124124
timeout: Duration,
125125
) -> Result<u32, Status> {
126126
hostcalls::dispatch_grpc_call(
127-
upstream_name,
127+
upstream,
128128
service_name,
129129
method_name,
130130
initial_metadata,

0 commit comments

Comments
 (0)