Skip to content

Commit

Permalink
Revert server side of dealing with slashes in handles.
Browse files Browse the repository at this point in the history
This turns out to be a bit more complicated. We will implement this in a
separate PR.
  • Loading branch information
partim committed Aug 1, 2024
1 parent 96e8987 commit 0919e13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cli/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ impl KrillClient {
//------------ Path Helpers --------------------------------------------------

fn ca_path(ca: &CaHandle) -> impl IntoIterator<Item = Cow<'_, str>> {
["api/v1/cas".into(), ca.as_str().into()]
["api/v1/cas".into(), encode(ca.as_str())]
}

fn child_path<'s>(
Expand Down
7 changes: 1 addition & 6 deletions src/daemon/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use hyper::body::Body;
use hyper::header::USER_AGENT;
use hyper::http::uri::PathAndQuery;
use hyper::{HeaderMap, Method, StatusCode};
use percent_encoding::percent_decode_str;

use rpki::ca::{provisioning, publication};

Expand Down Expand Up @@ -562,10 +561,6 @@ impl RequestPath {
where
T: FromStr,
{
self.next().and_then(|s| {
percent_decode_str(s).decode_utf8().ok()
}).and_then(|s| {
T::from_str(&s).ok()
})
self.next().and_then(|s| T::from_str(s).ok())
}
}

0 comments on commit 0919e13

Please sign in to comment.