diff --git a/test/http2/server.go b/test/http2/server.go index d50c05897..b06acb6d5 100644 --- a/test/http2/server.go +++ b/test/http2/server.go @@ -24,6 +24,7 @@ func lookupEnv(key, defaultVal string) string { func Serve() { crtFile := lookupEnv("TLS_CRT", defaultTLSCrt) keyFile := lookupEnv("TLS_KEY", defaultTLSKey) + customResponse := lookupEnv("CUSTOM_RESPONSE", "custom response") http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { fmt.Fprint(w, req.Proto) @@ -33,6 +34,10 @@ func Serve() { fmt.Fprint(w, "ready") }) + http.HandleFunc("/custom-response", func(w http.ResponseWriter, req *http.Request) { + fmt.Fprint(w, customResponse) + }) + go func() { port := lookupEnv("HTTP_PORT", defaultHTTPPort) log.Printf("Listening on port %v\n", port)