Browse Source

back to 307

Xiang Li 12 years ago
parent
commit
631d24791d
1 changed files with 1 additions and 5 deletions
  1. 1 5
      handlers.go

+ 1 - 5
handlers.go

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