Permalink
Browse files

Some bucket grabbing bugs found in anger.

  • Loading branch information...
1 parent 3be59c3 commit 64a48e485caac144416c47da7c608147dd2ed59d @dustin dustin committed Jun 12, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 vbmap.go
View
@@ -113,7 +113,12 @@ func mapHandler(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
bucket := getBucket(req)
+ if bucket == nil {
+ http.NotFound(w, req)
+ return
+ }
defer bucket.Close()
+ displayMap(w, req, bucket)
}
type vbstats map[string]map[string]interface{}
@@ -167,6 +172,10 @@ func statsHandler(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
bucket := getBucket(req)
+ if bucket == nil {
+ http.NotFound(w, req)
+ return
+ }
defer bucket.Close()
commonSuffixMC := couchbase.FindCommonSuffix(bucket.VBucketServerMap.ServerList)

0 comments on commit 64a48e4

Please sign in to comment.