From 66f6156ceb2b13ae75a9e74a08e97fd268179071 Mon Sep 17 00:00:00 2001 From: Romain de Laage Date: Tue, 2 Mar 2021 14:16:58 +0100 Subject: [PATCH] Handle empty path again --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 5922052..e79a195 100644 --- a/server.go +++ b/server.go @@ -169,7 +169,7 @@ func handleConn(conn *tls.Conn, baseURL, title, home_message string) { // profile if strings.HasPrefix(path, "/profile/") { // skip prefix - path = path[8:] + path = path[9:] _, err = strconv.ParseUint(path, 10, 64) if err != nil { log.Println("invalid request: %s", err) @@ -186,7 +186,7 @@ func handleConn(conn *tls.Conn, baseURL, title, home_message string) { printProfile(conn, baseURL, path) } /* thread */ else if strings.HasPrefix(path, "/thread/") { // skip prefix - path = path[7:] + path = path[8:] _, err = strconv.ParseUint(path, 10, 64) if err != nil {