fix: http: connect timeout.

This commit is contained in:
Daniel Ding
2024-07-15 10:56:12 +08:00
parent 40294c7324
commit 0b5ea13af0
2 changed files with 26 additions and 15 deletions

View File

@@ -24,13 +24,11 @@ import (
)
func NotFound(w http.ResponseWriter, r *http.Request) {
libol.Info("NotFound %s %s", r.Method, r.URL.Path)
http.Error(w, "oops!!!", http.StatusNotFound)
http.Error(w, "Oops!", http.StatusNotFound)
}
func NotAllowed(w http.ResponseWriter, r *http.Request) {
libol.Info("NotAllowed %s %s", r.Method, r.URL.Path)
http.Error(w, "oops!!!", http.StatusMethodNotAllowed)
http.Error(w, "Oops!", http.StatusMethodNotAllowed)
}
type Http struct {