Add body to benchHandler

This commit is contained in:
Emile Vauge
2018-06-06 17:36:52 +02:00
parent f1fe8b7fa0
commit 396480734c

3
app.go
View File

@ -47,10 +47,9 @@ func printBinary(s []byte) {
fmt.Printf("\n") fmt.Printf("\n")
} }
func benchHandler(w http.ResponseWriter, r *http.Request) { func benchHandler(w http.ResponseWriter, r *http.Request) {
// body := "Hello World\n"
w.Header().Set("Connection", "keep-alive") w.Header().Set("Connection", "keep-alive")
w.Header().Set("Content-Type", "text/plain") w.Header().Set("Content-Type", "text/plain")
// fmt.Fprint(w, body) fmt.Fprint(w, "1")
} }
func echoHandler(w http.ResponseWriter, r *http.Request) { func echoHandler(w http.ResponseWriter, r *http.Request) {
conn, err := upgrader.Upgrade(w, r, nil) conn, err := upgrader.Upgrade(w, r, nil)