Version is a package now, will be re-used across codebase.

This commit is contained in:
Harshavardhana committed 2015-09-17 20:17:33 -07:00
1 parent 1c5454e007
commit 7093a05ab1
8 files changed
+53 -12

No files matched your search

+3 -1
View File
@@ -22,9 +22,11 @@ import (
"encoding/json"
"encoding/xml"
"net/http"
"runtime"
"strconv"
"github.com/minio/minio/pkg/donut"
"github.com/minio/minio/pkg/version"
)
// No encoder interface exists, so we create one.
@@ -51,7 +53,7 @@ func generateRequestID() []byte {
func setCommonHeaders(w http.ResponseWriter, acceptsType string, contentLength int) {
// set unique request ID for each reply
w.Header().Set("X-Amz-Request-Id", string(generateRequestID()))
w.Header().Set("Server", "Minio")
w.Header().Set("Server", ("Minio/" + version.Version + " (" + runtime.GOOS + "," + runtime.GOARCH + ")"))
w.Header().Set("Accept-Ranges", "bytes")
w.Header().Set("Content-Type", acceptsType)
w.Header().Set("Connection", "close")