Browse Source
Merge pull request #2864 from guol-fnst/fix_response
fix error response in case of wrong expire time format
pull/2869/head
Chris Lu
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
weed/s3api/s3api_object_handlers.go
|
|
@ -63,7 +63,7 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request) |
|
|
|
|
|
|
|
if r.Header.Get("Expires") != "" { |
|
|
|
if _, err = time.Parse(http.TimeFormat, r.Header.Get("Expires")); err != nil { |
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrInvalidDigest) |
|
|
|
s3err.WriteErrorResponse(w, r, s3err.ErrMalformedExpires) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|