agate

Simple gemini server for static files
git clone https://github.com/mbrubeck/agate.git
Log | Files | Refs | README

commit ece2f20305f3cef57d33aab9d25686db394129a0
parent 9e039177df4bcc3ebebe00ba55b5a2b00c0209a4
Author: Matt Brubeck <mbrubeck@limpet.net>
Date:   Sun, 17 May 2020 10:43:15 -0700

Fix MIME type

Diffstat:
Msrc/main.rs | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 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(()) }