Skip to content

Commit

Permalink
readme keep alive
Browse files Browse the repository at this point in the history
  • Loading branch information
bddjr committed Jun 26, 2024
1 parent a504c10 commit 5a23a5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ srv.HttpOnHttpsPortErrorHandler = http.HandlerFunc(func(w http.ResponseWriter, r
// Keep Alive
srv.HttpOnHttpsPortErrorHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Connection", "keep-alive")
w.Header().Set("Keep-Alive", fmt.Sprint("timeout=", srv.IdleTimeout.Seconds()))
if srv.IdleTimeout != 0 {
w.Header().Set("Keep-Alive", fmt.Sprint("timeout=", srv.IdleTimeout.Seconds()))
}
w.WriteHeader(400)
io.WriteString(w, "Hello hlfhr")
})
Expand Down

0 comments on commit 5a23a5d

Please sign in to comment.