mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
XL/fs: GetObject should validate all its inputs. (#2142)
Fixes #2141 Fixes #2139
This commit is contained in:
@@ -74,8 +74,8 @@ func setObjectHeaders(w http.ResponseWriter, objInfo ObjectInfo, contentRange *h
|
||||
w.Header().Set("Content-Length", strconv.FormatInt(objInfo.Size, 10))
|
||||
|
||||
// for providing ranged content
|
||||
if contentRange != nil && contentRange.firstBytePos > -1 {
|
||||
// override content-length
|
||||
if contentRange != nil && contentRange.offsetBegin > -1 {
|
||||
// Override content-length
|
||||
w.Header().Set("Content-Length", strconv.FormatInt(contentRange.getLength(), 10))
|
||||
w.Header().Set("Content-Range", contentRange.String())
|
||||
w.WriteHeader(http.StatusPartialContent)
|
||||
|
||||
Reference in New Issue
Block a user