Skip to content

Commit

Permalink
enh: encode URI component db id (#3661)
Browse files Browse the repository at this point in the history
Co-authored-by: Henry Fontanier <henry@dust.tt>
  • Loading branch information
fontanierh and Henry Fontanier authored Feb 9, 2024
1 parent b8f1eac commit 9e3e7bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/sqlite_workers/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use anyhow::{anyhow, Result};
use hyper::{Body, Client, Request};
use serde::{Deserialize, Serialize};
use serde_json::json;
use urlencoding::encode;

use crate::{
databases::database::{QueryResult, Table},
Expand Down Expand Up @@ -45,7 +46,11 @@ impl SqliteWorker {

let req = Request::builder()
.method("POST")
.uri(format!("{}/databases/{}", worker_url, database_unique_id))
.uri(format!(
"{}/databases/{}",
worker_url,
encode(database_unique_id)
))
.header("Content-Type", "application/json")
.body(Body::from(
json!({
Expand Down

0 comments on commit 9e3e7bd

Please sign in to comment.