Skip to content

Commit 2dde605

Browse files
Decode percent encoding in url (#1347)
Some filters take quoted string arguements. As it is not possible to use quotes in an URL directly it is necessary to percent encode them. Change: percent-decode
1 parent 953c432 commit 2dde605

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

josh-proxy/src/bin/josh-proxy.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,9 @@ async fn call_service(
11851185
while path.contains("//") {
11861186
path = path.replace("//", "/");
11871187
}
1188-
path
1188+
percent_encoding::percent_decode_str(&path)
1189+
.decode_utf8_lossy()
1190+
.to_string()
11891191
};
11901192

11911193
if let Some(resource_path) = path.strip_prefix("/~/ui") {

0 commit comments

Comments
 (0)