aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2013-07-08 01:58:28 -0700
committerChris Lu <chris.lu@gmail.com>2013-07-08 01:58:28 -0700
commit53ae13a01257c3f6d21e3415fd03b2d55de91ef9 (patch)
treef21b2395df83246b6b17f1f05a55e79df8678108
parente30e325770243e5f40ca5a2371baf8f294d5a835 (diff)
downloadseaweedfs-53ae13a01257c3f6d21e3415fd03b2d55de91ef9.tar.xz
seaweedfs-53ae13a01257c3f6d21e3415fd03b2d55de91ef9.zip
change default number of volumes to 7, so that the first volume growth
would not fail.
-rw-r--r--go/weed/volume.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/go/weed/volume.go b/go/weed/volume.go
index 6cbbceaef..6282b0bc8 100644
--- a/go/weed/volume.go
+++ b/go/weed/volume.go
@@ -35,7 +35,7 @@ var (
publicUrl = cmdVolume.Flag.String("publicUrl", "", "Publicly accessible <ip|server_name>:<port>")
masterNode = cmdVolume.Flag.String("mserver", "localhost:9333", "master server location")
vpulse = cmdVolume.Flag.Int("pulseSeconds", 5, "number of seconds between heartbeats, must be smaller than the master's setting")
- maxVolumeCount = cmdVolume.Flag.Int("max", 5, "maximum number of volumes")
+ maxVolumeCount = cmdVolume.Flag.Int("max", 7, "maximum number of volumes")
vReadTimeout = cmdVolume.Flag.Int("readTimeout", 3, "connection read timeout in seconds")
vMaxCpu = cmdVolume.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs")
dataCenter = cmdVolume.Flag.String("dataCenter", "", "current volume server's data center name")
@@ -165,6 +165,10 @@ func GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool)
if n.NameSize > 0 {
w.Header().Set("Content-Disposition", "filename="+fileNameEscaper.Replace(string(n.Name)))
}
+ if n.LastModified != 0 {
+ println("file time is", n.LastModified)
+ w.Header().Set("Last-Modified", time.Unix(int64(n.LastModified), 0).Format(http.TimeFormat))
+ }
if ext != ".gz" {
if n.IsGzipped() {
if strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") {