now join, status, read, write for weed server are working!

git-svn-id: https://weed-fs.googlecode.com/svn/trunk@15 282b0af5-e82d-9cf1-ede4-77906d7719d0
This commit is contained in:
chris.lu@gmail.com
2011-12-18 10:35:59 +00:00
parent 2c7a4eea1f
commit 041a93887c
2 changed files with 26 additions and 18 deletions

View File

@@ -20,7 +20,7 @@ var (
)
func dirReadHandler(w http.ResponseWriter, r *http.Request) {
volumeId, _ := strconv.Atoi(r.FormValue("volumeId"))
volumeId, _ := strconv.Atoui64(r.FormValue("volumeId"))
machine := mapper.Get(volumeId)
writeJson(w, r, machine)
}
@@ -55,7 +55,7 @@ func writeJson(w http.ResponseWriter, r *http.Request, obj interface{}) {
fmt.Fprint(w, string(bytes))
w.Write([]uint8(")"))
}
log.Println("JSON Response", string(bytes))
//log.Println("JSON Response", string(bytes))
}
func main() {