Skip to content

Commit

Permalink
REST plugin forwards the full http content-type in zenoh encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Oct 4, 2023
1 parent c35a194 commit 8f7d4cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/zenoh-plugin-rest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ async fn query(mut req: Request<(Arc<Session>, String)>) -> tide::Result<Respons
if !body.is_empty() {
let encoding: Encoding = req
.content_type()
.map(|m| m.essence().to_owned().into())
.map(|m| m.to_string().into())
.unwrap_or_default();
query = query.with_value(Value::from(body).encoding(encoding));
}
Expand Down Expand Up @@ -441,7 +441,7 @@ async fn write(mut req: Request<(Arc<Session>, String)>) -> tide::Result<Respons
};
let encoding: Encoding = req
.content_type()
.map(|m| m.essence().to_owned().into())
.map(|m| m.to_string().into())
.unwrap_or_default();

// @TODO: Define the right congestion control value
Expand Down

0 comments on commit 8f7d4cd

Please sign in to comment.