From ece2f20305f3cef57d33aab9d25686db394129a0 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Sun, 17 May 2020 10:43:15 -0700 Subject: [PATCH] Fix MIME type --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5a3cefa..c09e840 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,10 +59,9 @@ async fn connection(acceptor: TlsAcceptor, stream: TcpStream) -> Result { eprintln!("Got request: {:?}", body); let mut stream = stream.into_inner(); - stream.write_all(b"20 text/plain\r\n").await?; + stream.write_all(b"20 text/gemini\r\n").await?; stream.write_all(b"=> ").await?; stream.write_all(body.trim().as_bytes()).await?; - stream.write_all(b" Go to ").await?; - stream.write_all(body.as_bytes()).await?; + stream.write_all(b" Reload\r\n").await?; Ok(()) }