Skip to content

Instantly share code, notes, and snippets.

@jkopczyn
Last active August 11, 2022 19:33
Show Gist options
  • Save jkopczyn/068fd2edd8d259a94d18e0229030d629 to your computer and use it in GitHub Desktop.
Save jkopczyn/068fd2edd8d259a94d18e0229030d629 to your computer and use it in GitHub Desktop.
server to make datadog SubmitMetrics crash
package main
import (
"github.com/sirupsen/logrus"
"net/http"
)
func serveHTTP(wr http.ResponseWriter, req *http.Request) {
http.Error(wr, "Client Error: Headers", http.StatusOK)
}
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/", serveHTTP)
logrus.Info("Server online...")
logrus.Fatal("ListenAndServe:", http.ListenAndServe(":80", mux))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment