mirror of
https://github.com/minio/minio.git
synced 2025-02-24 20:09:13 -05:00
Merge pull request #271 from harshavardhana/pr_out_rfc1123_is_wrong_protocol_format_for_aws
This commit is contained in:
commit
54b87b483a
@ -22,7 +22,6 @@ import (
|
|||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
|
||||||
|
|
||||||
mstorage "github.com/minio-io/minio/pkg/storage"
|
mstorage "github.com/minio-io/minio/pkg/storage"
|
||||||
)
|
)
|
||||||
@ -56,9 +55,13 @@ func writeErrorResponse(w http.ResponseWriter, response interface{}, acceptsType
|
|||||||
return bytesBuffer.Bytes()
|
return bytesBuffer.Bytes()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
sendFormat = "2006-01-02T15:04:05.000Z"
|
||||||
|
)
|
||||||
|
|
||||||
// Write object header
|
// Write object header
|
||||||
func writeObjectHeaders(w http.ResponseWriter, metadata mstorage.ObjectMetadata) {
|
func writeObjectHeaders(w http.ResponseWriter, metadata mstorage.ObjectMetadata) {
|
||||||
lastModified := metadata.Created.Format(time.RFC1123)
|
lastModified := metadata.Created.Format(sendFormat)
|
||||||
// common headers
|
// common headers
|
||||||
writeCommonHeaders(w, metadata.ContentType)
|
writeCommonHeaders(w, metadata.ContentType)
|
||||||
w.Header().Set("ETag", metadata.ETag)
|
w.Header().Set("ETag", metadata.ETag)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user