w.Header().Add("Content-Type", "text/html")
w.WriteHeader(http.StatusOK)
u := geminifyURL(host, cols[1], paths...)
- w.Write([]byte(
- fmt.Sprintf(
- `<!DOCTYPE html>
+ fmt.Fprintf(w, `<!DOCTYPE html>
<html><head><title>%d (%s) redirection</title></head>
-<body><a href="%s">%s</a></body></html>`,
- code, codeName, u, u,
- )))
+<body><a href="%s">%s</a></body></html>`, code, codeName, u, u)
fifos.LogRedir <- fmt.Sprintf(
"%s %s\t%d\t%s", req.Method, req.URL, code, cols[1],
)