trim \r and \n from client input

This fixes clients like bomabdillo not being shown anything when they
only write a \n instead of \r\n.

git-svn-id: file:///srv/svn/repo/tokiko/trunk@3 8f5ca974-a7f8-e144-9f80-d41d5039c194
This commit is contained in:
shokara 2021-12-23 17:53:10 +00:00
parent 43309deebe
commit f5f9ba6e3e

View File

@ -51,7 +51,7 @@ func connHandle(c net.Conn) {
return return
} }
if data == "\r\n" { if strings.TrimRight(data, "\r\n") == "" {
printGophermap(c, "./") printGophermap(c, "./")
} }