~garritfra/taurus

taurus: Infer gemini:// scheme in the URL v1 NEEDS REVISION

Alexey Yerin: 1
 Infer gemini:// scheme in the URL

 1 files changed, 4 insertions(+), 0 deletions(-)
#340407 ci.yml success
> Also, since we have CI now, could you write some tests for this?
Of course
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~garritfra/taurus/patches/14951/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH taurus] Infer gemini:// scheme in the URL Export this patch

Signed-off-by: Alexey Yerin <yerinalexey98fd@gmail.com>
---
 src/main.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index 86d899b..ed34ed8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -135,6 +135,10 @@ fn handle_client(mut stream: TlsStream<TcpStream>, static_root: &str) -> TaurusR
        .map_err(TaurusError::StreamReadFailed)?;

    let mut raw_request = String::from_utf8_lossy(&buffer[..]).into_owned();

    if raw_request.starts_with("//") {
        raw_request = format!("gemini:{}", raw_request);
    }
    if !raw_request.starts_with("gemini://") {
        raw_request = format!("gemini://{}", raw_request);
    }
-- 
2.29.2
builds.sr.ht
taurus/patches/ci.yml: SUCCESS in 1m58s

[Infer gemini:// scheme in the URL][0] from [Alexey Yerin][1]

[0]: https://lists.sr.ht/~garritfra/taurus/patches/14951
[1]: mailto:yerinalexey98fd@gmail.com

✓ #340407 SUCCESS taurus/patches/ci.yml https://builds.sr.ht/~garritfra/job/340407