diff options
| -rw-r--r-- | http.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 } |
