From bbb68cd5c1c1c0655e27101b5fa85cfe21ee5590 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 4 Apr 2024 01:47:48 +0000 Subject: feat(response): clean up proxy info --- src/html.rs | 8 +------- src/response.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/html.rs b/src/html.rs index d50501c..b86c496 100644 --- a/src/html.rs +++ b/src/html.rs @@ -21,13 +21,7 @@ fn link_from_host_href(url: &Url, href: &str) -> Option { Some(format!( "gemini://{}{}{}", url.domain()?, - { - if href.starts_with('/') { - "" - } else { - "/" - } - }, + { if href.starts_with('/') { "" } else { "/" } }, href )) } diff --git a/src/response.rs b/src/response.rs index eea131d..bb77079 100644 --- a/src/response.rs +++ b/src/response.rs @@ -255,12 +255,12 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< "
\nProxy Information
Original URL
{0}
-
Status code
-
{:?}
-
Meta
{}
-
Capsule response time
+
Status Code
+
{} ({})
+
Meta
{}
+
Capsule Response Time
{} milliseconds
-
Gemini-to-HTML time
+
Gemini-to-HTML Time
{} milliseconds

This content has been proxied by \ @@ -268,6 +268,7 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".<

", url, response.status(), + i32::from(response.status().clone()), response.meta(), response_time_taken.as_nanos() as f64 / 1_000_000.0, convert_time_taken.as_nanos() as f64 / 1_000_000.0, -- cgit v1.2.3