aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-03-26 05:22:03 +0000
committerFuwn <[email protected]>2024-03-26 05:22:03 +0000
commit08407e4389852cc223d61575caf286cbd437124a (patch)
tree09f9a77a82b3d5ccc8d429731b06df8c4e0f9be3 /src
parentfeat(response): support redirects (diff)
downloadseptember-08407e4389852cc223d61575caf286cbd437124a.tar.xz
september-08407e4389852cc223d61575caf286cbd437124a.zip
refactor(url): rename make
Diffstat (limited to 'src')
-rw-r--r--src/response.rs6
-rw-r--r--src/url.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/response.rs b/src/response.rs
index 717da4c..a6817a2 100644
--- a/src/response.rs
+++ b/src/response.rs
@@ -16,7 +16,7 @@
// SPDX-License-Identifier: GPL-3.0-only
use {
- crate::url::make as make_url,
+ crate::url::from_path as url_from_path,
actix_web::{Error, HttpResponse},
std::{env::var, time::Instant},
};
@@ -43,7 +43,7 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".<
let mut is_raw = false;
let mut is_nocss = false;
// Try to construct a Gemini URL
- let url = match make_url(
+ let url = match url_from_path(
&format!("{}{}", req.path(), {
if !req.query_string().is_empty() || req.uri().to_string().ends_with('?')
{
@@ -76,7 +76,7 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".<
};
if response.content().is_some() {
- response = match germ::request::request(&match make_url(
+ response = match germ::request::request(&match url_from_path(
req.path().trim_end_matches('/'),
true,
&mut is_proxy,
diff --git a/src/url.rs b/src/url.rs
index 8f510aa..e004696 100644
--- a/src/url.rs
+++ b/src/url.rs
@@ -17,7 +17,7 @@
use url::Url;
-pub fn make(
+pub fn from_path(
path: &str,
fallback: bool,
is_proxy: &mut bool,