aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2015-02-12 21:12:53 -0800
committerchrislusf <chris.lu@gmail.com>2015-02-12 21:12:53 -0800
commit226df38c957f8d564e348f5a052c40d34b7bea21 (patch)
tree933527a8b6c82724183288e8b6ee59d74910e445
parente282a9b06aa6e99a7b167afe1d5bcedae3e69ec6 (diff)
downloadseaweedfs-226df38c957f8d564e348f5a052c40d34b7bea21.tar.xz
seaweedfs-226df38c957f8d564e348f5a052c40d34b7bea21.zip
Redirect to publicUrl
Redirect to publicUrl
-rw-r--r--go/weed/weed_server/volume_server_handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/go/weed/weed_server/volume_server_handlers.go b/go/weed/weed_server/volume_server_handlers.go
index d3fdf0cb2..5049847c6 100644
--- a/go/weed/weed_server/volume_server_handlers.go
+++ b/go/weed/weed_server/volume_server_handlers.go
@@ -61,7 +61,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
lookupResult, err := operation.Lookup(vs.GetMasterNode(), volumeId.String())
glog.V(2).Infoln("volume", volumeId, "found on", lookupResult, "error", err)
if err == nil && len(lookupResult.Locations) > 0 {
- http.Redirect(w, r, "http://"+lookupResult.Locations[0].Url+r.URL.Path, http.StatusMovedPermanently)
+ http.Redirect(w, r, "http://"+lookupResult.Locations[0].PublicUrl+r.URL.Path, http.StatusMovedPermanently)
} else {
glog.V(2).Infoln("lookup error:", err, r.URL.Path)
w.WriteHeader(http.StatusNotFound)