diff --git a/Cargo.lock b/Cargo.lock index f7be5e1..7155be6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3036,7 +3036,7 @@ dependencies = [ [[package]] name = "py_chrontext" -version = "0.9.10" +version = "0.9.11" dependencies = [ "chrontext", "env_logger", diff --git a/lib/flight/src/client.rs b/lib/flight/src/client.rs index e8def33..2acf8bc 100644 --- a/lib/flight/src/client.rs +++ b/lib/flight/src/client.rs @@ -9,11 +9,11 @@ use query_processing::errors::QueryProcessingError; use query_processing::graph_patterns::union; use representation::solution_mapping::SolutionMappings; use representation::RDFNodeType; +use secrecy::{ExposeSecret, SecretString}; use std::collections::HashMap; use std::str::FromStr; -use std::time::Duration; -use secrecy::{ExposeSecret, SecretString}; use thiserror::*; +use tonic::metadata::MetadataKey; use tonic::transport::{Channel, Endpoint}; use tonic::{Request, Status}; @@ -63,8 +63,11 @@ impl ChrontextFlightClient { }; info!("Building request"); let mut request = Request::new(Ticket::new(serialize(query).unwrap())); - for (k,v) in metadata { - request.metadata_mut().insert(k, v.expose_secret().parse().unwrap()); + for (k, v) in metadata { + request.metadata_mut().insert( + MetadataKey::from_str(k).unwrap().to_owned(), + v.expose_secret().parse().unwrap(), + ); } info!("Sending request"); let mut flight_data = client diff --git a/py_chrontext/Cargo.toml b/py_chrontext/Cargo.toml index 621d2ae..faecbb4 100644 --- a/py_chrontext/Cargo.toml +++ b/py_chrontext/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "py_chrontext" -version = "0.9.10" +version = "0.9.11" edition = "2021" [dependencies]