diff --git a/http.go b/http.go index 6ff3bb1..af3d16f 100644 --- a/http.go +++ b/http.go @@ -6,6 +6,7 @@ import ( "net/http" "strings" + "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" ) @@ -37,7 +38,15 @@ func okHandler(w http.ResponseWriter, r *http.Request) { log.Info("hostname was blank") return } - log.Info("Got URL msg length:", len(msg)) + var packs *zoopb.Packages + packs = new(zoopb.Packages) + if err := packs.Unmarshal(msg); err != nil { + log.Info("proto.Unmarshal() failed on wire message len", len(msg), "from", hostname) + return + } + + log.Info("Unmarshal worked with msg len", len(msg), "from", hostname) + log.Info(hostname, "has", packs.Len(), "packages installed") return }