Merge pull request #684 from harshavardhana/pr_out_handle_0byte_file_downloads_properly
This commit is contained in:
Generated
+1
-1
@@ -36,7 +36,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/minio/objectstorage-go",
|
||||
"Rev": "883ebdb4593b397713be5f0818174f71ee6724e0"
|
||||
"Rev": "7e4b2520052fedcc40be93c93cbb13688d11285d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/shiena/ansicolor",
|
||||
|
||||
+4
-3
@@ -401,12 +401,13 @@ func (a *lowLevelAPI) getObjectRequest(bucket, object string, offset, length uin
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// TODO - fix this to support full - http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
|
||||
switch {
|
||||
case length > 0:
|
||||
case length > 0 && offset > 0:
|
||||
r.Set("Range", fmt.Sprintf("bytes=%d-%d", offset, offset+length-1))
|
||||
default:
|
||||
case offset > 0 && length == 0:
|
||||
r.Set("Range", fmt.Sprintf("bytes=%d-", offset))
|
||||
case length > 0 && offset == 0:
|
||||
r.Set("Range", fmt.Sprintf("bytes=-%d", length))
|
||||
}
|
||||
return r, nil
|
||||
}
|
||||
|
||||
+8
-4
@@ -66,9 +66,9 @@ EXAMPLES:
|
||||
|
||||
5. List files with non english characters on Amazon S3 object storage
|
||||
$ mc ls s3:andoria/本...
|
||||
[2015-05-19 17:21:49 PDT] 41B 本b語
|
||||
[2015-05-19 17:24:19 PDT] 41B 本b語.1
|
||||
[2015-05-19 17:28:22 PDT] 41B 本語
|
||||
[2015-05-19 17:21:49 PDT] 41B 本語.pdf
|
||||
[2015-05-19 17:24:19 PDT] 41B 本語.txt
|
||||
[2015-05-19 17:28:22 PDT] 41B 本語.md
|
||||
|
||||
`,
|
||||
}
|
||||
@@ -140,7 +140,7 @@ EXAMPLES:
|
||||
$ mc {{.Name}} s3:documents/2014/... C:\backup\2014 C:\shared\volume\backup\2014
|
||||
|
||||
5. Sync a local file of non english character to Amazon s3 object storage
|
||||
$ mc {{.Name}} 本語 s3:mylocaldocuments C:\backup\2014 play:backup
|
||||
$ mc {{.Name}} 本語/... s3:mylocaldocuments C:\backup\2014 play:backup
|
||||
|
||||
`,
|
||||
}
|
||||
@@ -199,6 +199,10 @@ EXAMPLES:
|
||||
|
||||
3. Concantenate multiple files from local filesystem to standard output.
|
||||
$ mc {{.Name}} *.txt > newfile.txt
|
||||
|
||||
4. Concatenate a non english file name from Amazon S3 object storage
|
||||
$ mc {{.Name}} s3:andoria/本語 > /tmp/本語
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user