about summary refs log tree commit diff
path: root/src/login.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/login.rs')
-rw-r--r--src/login.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/login.rs b/src/login.rs
index 646c832..19bfaf7 100644
--- a/src/login.rs
+++ b/src/login.rs
@@ -332,7 +332,13 @@ async fn client_metadata<S: Storage + Send + Sync + 'static>(
         digest.update(b" ");
         digest.update(crate::OAUTH2_SOFTWARE_ID.as_bytes());
 
-        let etag = String::from("W/") + &hex::encode(digest.finalize());
+        let etag = {
+            let mut etag = String::with_capacity(66);
+            etag.push_str("W/");
+            data_encoding::HEXLOWER.encode_append(&digest.finalize(), &mut etag);
+
+            etag
+        };
         axum_extra::headers::ETag::from_str(&etag).unwrap()
     };
     if let Some(cached) = cached {