back to 307

This commit is contained in:
Xiang Li 2013-07-06 15:54:21 -07:00
parent 8244113a3e
commit 631d24791d

View File

@ -4,11 +4,7 @@ import (
"encoding/json" "encoding/json"
"github.com/xiangli-cmu/go-raft" "github.com/xiangli-cmu/go-raft"
"net/http" "net/http"
//"fmt"
"io/ioutil"
//"bytes"
"strconv" "strconv"
//"strings"
"time" "time"
) )
@ -270,7 +266,7 @@ func WatchHttpHandler(w http.ResponseWriter, req *http.Request) {
} else if req.Method == "POST" { } else if req.Method == "POST" {
debug("[recv] POST http://%v/watch/%s", server.Name(), key) debug("[recv] POST http://%v/watch/%s", server.Name(), key)
content, err := ioutil.ReadAll(req.Body) content := req.FormValue("index")
sinceIndex, err := strconv.ParseUint(string(content), 10, 64) sinceIndex, err := strconv.ParseUint(string(content), 10, 64)
if err != nil { if err != nil {