mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 23:57:46 +00:00
parent
5c366e14a3
commit
465d9b7ba7
7 changed files with 30 additions and 9 deletions
|
@ -46,11 +46,7 @@ pub async fn canonical_path(path: String) -> Result<Option<String>, String> {
|
|||
res
|
||||
.headers()
|
||||
.get(header::LOCATION)
|
||||
.map(|val| percent_encode(val.as_bytes(), CONTROLS)
|
||||
.to_string()
|
||||
.trim_start_matches(REDDIT_URL_BASE)
|
||||
.to_string()
|
||||
),
|
||||
.map(|val| percent_encode(val.as_bytes(), CONTROLS).to_string().trim_start_matches(REDDIT_URL_BASE).to_string()),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue