async_client: Build the URL path a bit more cleanly.

master
Damir Jelić 2020-04-09 16:27:43 +02:00
parent 8583232873
commit ee290add45
1 changed files with 5 additions and 4 deletions

View File

@ -564,10 +564,11 @@ impl AsyncClient {
{
let request: http::Request<Vec<u8>> = request.try_into()?;
let url = request.uri();
let url = self
.homeserver
.join(url.path_and_query().unwrap().as_str())
.unwrap();
let path_and_query = url.path_and_query().unwrap();
let mut url = self.homeserver.clone();
url.set_path(path_and_query.path());
url.set_query(path_and_query.query());
trace!("Doing request {:?}", url);