Browse Source

Merge pull request #255 from xiangli-cmu/0.2-fix-devlist-issue

0.2 fix devlist issue
Xiang Li 12 years ago
parent
commit
61f238f22e
2 changed files with 4 additions and 1 deletions
  1. 2 1
      server/util.go
  2. 2 0
      store/store.go

+ 2 - 1
server/util.go

@@ -20,7 +20,8 @@ func decodeJsonRequest(req *http.Request, data interface{}) error {
 
 func redirect(hostname string, w http.ResponseWriter, req *http.Request) {
 	path := req.URL.Path
-	url := hostname + path
+	query := req.URL.RawQuery
+	url := hostname + path + "?" + query
 	log.Debugf("Redirect to %s", url)
 	http.Redirect(w, req, url, http.StatusTemporaryRedirect)
 }

+ 2 - 0
store/store.go

@@ -306,6 +306,8 @@ func (s *store) Update(nodePath string, newValue string, expireTime time.Time, i
 	// update ttl
 	n.UpdateTTL(expireTime)
 
+	e.Value = newValue
+
 	e.Expiration, e.TTL = n.ExpirationAndTTL()
 
 	s.WatcherHub.notify(e)