From 4f83c8c353d25a1e2bf5c4859428bb2c3f1c04bb Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 24 Aug 2020 15:40:50 +0530 Subject: fix minor inconveniences --- src/service.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/service.rs b/src/service.rs index b7b204c..6526d15 100644 --- a/src/service.rs +++ b/src/service.rs @@ -21,13 +21,12 @@ fn welcome(req: Request) -> Response { let host = _h.as_ref().map(|h| h.as_bytes()).unwrap_or(b""); let text = format!( " -This URL shortening services is powered by hedge. +This URL shortening service is powered by hedge. github.com/nerdypepper/hedge To shorten urls: - curl -F'shorten=https://shorten.some/long/url' {} - ", + curl -F'shorten=https://shorten.some/long/url' {}\n", String::from_utf8_lossy(host) ); return Response::builder() @@ -37,7 +36,7 @@ To shorten urls: } fn respond_with_shortlink>(shortlink: S, host: &[u8]) -> Response { - let url = [host, b"/", shortlink.as_ref()].concat(); + let url = [b"https://", host, b"/", shortlink.as_ref(), b"\n"].concat(); info!("Successfully generated shortlink"); Response::builder() .status(StatusCode::OK) -- cgit v1.2.3