From a25f3b080856e9de1283352a47503a201d848fa1 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 29 Nov 2010 07:35:16 -0800 Subject: [PATCH] add a camsigd root handler --- server/go/sigserver/camsigd.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/go/sigserver/camsigd.go b/server/go/sigserver/camsigd.go index 4e9b650c5..47088691b 100644 --- a/server/go/sigserver/camsigd.go +++ b/server/go/sigserver/camsigd.go @@ -24,6 +24,10 @@ var listen *string = flag.String("listen", "0.0.0.0:2856", "host:port to listen var accessPassword string +func handleRoot(conn http.ResponseWriter, req *http.Request) { + fmt.Fprintf(conn, "camsigd") +} + func handleCamliSig(conn http.ResponseWriter, req *http.Request) { handler := func (conn http.ResponseWriter, req *http.Request) { http_util.BadRequestError(conn, "Unsupported path or method.") @@ -67,6 +71,7 @@ func main() { } mux := http.NewServeMux() + mux.HandleFunc("/", handleRoot) mux.HandleFunc("/camli/sig/", handleCamliSig) fmt.Printf("Starting to listen on http://%v/\n", *listen)