mirror of
https://github.com/minio/minio.git
synced 2025-11-10 14:09:48 -05:00
fix: time.Parse RFC3339Nano (#16892)
This commit is contained in:
@@ -232,7 +232,7 @@ func putOpts(ctx context.Context, r *http.Request, bucket, object string, metada
|
|||||||
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
||||||
mtime := UTCNow()
|
mtime := UTCNow()
|
||||||
if mtimeStr != "" {
|
if mtimeStr != "" {
|
||||||
mtime, err = time.Parse(time.RFC3339, mtimeStr)
|
mtime, err = time.Parse(time.RFC3339Nano, mtimeStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return opts, InvalidArgument{
|
return opts, InvalidArgument{
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
@@ -353,7 +353,7 @@ func completeMultipartOpts(ctx context.Context, r *http.Request, bucket, object
|
|||||||
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
mtimeStr := strings.TrimSpace(r.Header.Get(xhttp.MinIOSourceMTime))
|
||||||
mtime := UTCNow()
|
mtime := UTCNow()
|
||||||
if mtimeStr != "" {
|
if mtimeStr != "" {
|
||||||
mtime, err = time.Parse(time.RFC3339, mtimeStr)
|
mtime, err = time.Parse(time.RFC3339Nano, mtimeStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return opts, InvalidArgument{
|
return opts, InvalidArgument{
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
|
|||||||
Reference in New Issue
Block a user