From 28fbcfdeb2e93fbf3dc20731d3ef995935964637 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 24 Jul 2024 00:24:25 +0000 Subject: chore: remove semi-outdated technical information --- src/response.rs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/response.rs') diff --git a/src/response.rs b/src/response.rs index 0159145..eceaa30 100644 --- a/src/response.rs +++ b/src/response.rs @@ -25,7 +25,6 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< let mut is_proxy = false; let mut is_raw = false; let mut is_nocss = false; - // Try to construct a Gemini URL let url = match url_from_path( &format!("{}{}", req.path(), { if !req.query_string().is_empty() || req.uri().to_string().ends_with('?') @@ -49,7 +48,6 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< ); } }; - // Make a request to get Gemini content and time it. let mut timer = Instant::now(); let mut response = match germ::request::request(&url).await { Ok(response) => response, @@ -94,10 +92,8 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< let language = meta.parameters().get("lang").map_or_else(String::new, ToString::to_string); - // Reset timer for below timer = Instant::now(); - // Convert Gemini Response to HTML and time it. let mut html_context = if is_raw { String::new() } else { @@ -137,8 +133,6 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< ); } - // Try to add an external stylesheet from the `CSS_EXTERNAL` environment - // variable. if let Ok(css) = var("CSS_EXTERNAL") { let stylesheets = css.split(',').filter(|s| !s.is_empty()).collect::>(); @@ -160,8 +154,6 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< } } - // Try to add an external favicon from the `FAVICON_EXTERNAL` environment - // variable. if let Ok(favicon) = var("FAVICON_EXTERNAL") { html_context.push_str(&format!( "", @@ -182,7 +174,6 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< html_context.push_str(&head); } - // Add a title to HTML response html_context.push_str(&format!("{gemini_title}")); html_context.push_str(""); @@ -216,7 +207,6 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< _ => html_context.push_str(&format!("

{}

", response.meta())), } - // Add proxy information to footer of HTML response html_context.push_str(&format!( "
\nProxy Information
-- cgit v1.2.3