Additional debug logging for percent decoding stage

This commit is contained in:
Karcsesz 2024-02-14 22:34:59 +01:00
parent 6f71ab08f6
commit b643fceca3

View file

@ -81,7 +81,11 @@ async fn run_webfinger_query(
info!("Received query with {uri}"); info!("Received query with {uri}");
let query = uri.query().ok_or(StatusCode::BAD_REQUEST)?; let query = uri.query().ok_or(StatusCode::BAD_REQUEST)?;
debug!("Query string is {query}"); debug!("Query string is {query}");
let query = urlencoding::decode(query).map_err(|e| StatusCode::BAD_REQUEST)?; let query = urlencoding::decode(query).map_err(|e| {
debug!("Failed to decode query string with error {e}");
StatusCode::BAD_REQUEST
})?;
debug!("Decoded query string is {query}");
let params = query let params = query
.split('&') .split('&')
.filter_map(|query_part| { .filter_map(|query_part| {