From 2dc819088c8a093fd9d559450ad9169168ab06d7 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 20 Sep 2014 09:39:22 -0500 Subject: [PATCH] I don't even remember this crap --- logstash/crispy/main.go | 8 ++++++-- logstash/sirgoldenvoncrispywhite/main.go | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/logstash/crispy/main.go b/logstash/crispy/main.go index cc44f7e..92592f1 100644 --- a/logstash/crispy/main.go +++ b/logstash/crispy/main.go @@ -11,8 +11,8 @@ import ( func main() { server := newCrispyServer() http.Handle("/", server) - log.Printf("Serving on :9764 with %+v\n", server) - log.Fatal(http.ListenAndServe(":9764", nil)) + log.Printf("Serving on :9799 with %+v\n", server) + log.Fatal(http.ListenAndServe(":9799", nil)) } type crispyServer struct { @@ -26,6 +26,10 @@ func newCrispyServer() *crispyServer { } func (me *crispyServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/DIE" && r.Method == "POST" { + me.logstasher.Fatal("OH GOSH") + } + j, err := json.Marshal(r) if err == nil { me.logstasher.Println(string(j)) diff --git a/logstash/sirgoldenvoncrispywhite/main.go b/logstash/sirgoldenvoncrispywhite/main.go index fa3d0e7..9faab59 100644 --- a/logstash/sirgoldenvoncrispywhite/main.go +++ b/logstash/sirgoldenvoncrispywhite/main.go @@ -15,8 +15,8 @@ func main() { } http.Handle("/", server) - log.Printf("Serving on :9764 with %+v\n", server) - log.Fatal(http.ListenAndServe(":9764", nil)) + log.Printf("Serving on :9799 with %+v\n", server) + log.Fatal(http.ListenAndServe(":9799", nil)) } type crispyServer struct {