add a camsigd root handler

This commit is contained in:
Brad Fitzpatrick 2010-11-29 07:35:16 -08:00
parent 2567346b70
commit a25f3b0808
1 changed files with 5 additions and 0 deletions

View File

@ -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)