Anis Elleuch
70e70446bb
signv4: Read always returns EOF when stream ends ( #3692 )
...
When EOF is reached, further calls of Read() doesn't return io.EOF
but continue to work as it expects to have more data, this PR fixes
the behavior
8 years ago
Harshavardhana
77a192a7b5
Implement CopyObjectPart API ( #3663 )
...
This API is implemented to allow copying data from an
existing source object to an ongoing multipart operation
http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html
Fixes #3662
8 years ago
Harshavardhana
69559aa101
objAPI: Implement CopyObject API. ( #3487 )
...
This is written so that to simplify our handler code
and provide a way to only update metadata instead of
the data when source and destination in CopyObject
request are same.
Fixes #3316
8 years ago
Bala FA
e8ce3b64ed
Generate and use access/secret keys properly ( #3498 )
8 years ago
Bala FA
825000bc34
Use humanize constants for KiB, MiB and GiB units. ( #3322 )
8 years ago
Bala FA
bef0a50bc1
Cleanup and fixes ( #3273 )
...
* newRequestID() (previously generateUploadID()) returns string than byte array.
* Remove unclear comments and added appropriate comments.
* SHA-256, MD5 Hash functions return Hex/Base64 encoded string than byte array.
* Remove duplicate MD5 hasher functions.
* Rename listObjectsValidateArgs() into validateListObjectsArgs()
* Remove repeated auth check code in all bucket request handlers.
* Remove abbreviated names in bucket-metadata
* Avoid nested if in bucketPolicyMatchStatement()
* Use ioutil.ReadFile() instead of os.Open() and ioutil.ReadAll()
* Set crossDomainXML as constant.
8 years ago
Harshavardhana
a8ab02a73a
v4/presign: Fix presign requests when there are more signed headers. ( #3222 )
...
This fix removes a wrong logic which fails for requests which
have more signed headers in a presign request.
Fixes #3217
8 years ago
Harshavardhana
51d1e6f75b
Fix missing CompleteMultipartUpload Etag. ( #3227 )
...
Fixes #3224
8 years ago
Bala FA
9c2cfb5cb6
tests: Add missing unit test cases for AbortMultipartUploadHandler(). ( #3200 )
...
Fixes #3070
8 years ago
Bala FA
91a0ade908
tests: add unit test for HeadObjectHandler ( #3197 )
...
Fixes #3068
8 years ago
Karthic Rao
286a8924fd
Add leak detection to object-handler tests. ( #3195 )
8 years ago
Karthic Rao
3e8cb8c937
build: ineffassign fixes. ( #3134 )
8 years ago
Karthic Rao
63f1b4fdf4
mispell fixes. ( #3100 )
8 years ago
Krishnan Parthasarathi
31f2db6880
Remove leftover debug statement from PutObject StreamingSignature unit-test ( #3099 )
8 years ago
Krishnan Parthasarathi
12cd2da265
Add PutObjectHandler unit tests covering failure cases ( #3096 )
8 years ago
Bala FA
36639b65a9
rename completeMultipartMD5() into getCompleteMultipartMD5(). ( #3051 )
8 years ago
Karthic Rao
070d3610ff
tests: V2 Signature tests for object-handlers. ( #2931 )
8 years ago
Krishnan Parthasarathi
a5921b5743
Use same timestamp for all chunks in chunked signature ( #2908 )
8 years ago
Karthic Rao
ff91ecb177
tests: Adding unknown signature type test for API handlers. ( #2905 )
8 years ago
Krishnan Parthasarathi
2d5e988a6d
Refactor streaming signatureV4 w/ state machine ( #2862 )
...
* Refactor streaming signatureV4 w/ state machine
- Used state machine to make transitions between reading chunk header,
chunk data and trailer explicit.
* debug: add print/panic statements to gather more info on CI failure
* Persist lastChunk status between Read() on ChunkReader
... remove panic() which was added as interim aid for debugging.
* Add unit-tests to cover v4 streaming signature
8 years ago
Karthic Rao
09463265ce
tests: Adding anonymous requests tests for bucket policy handlers. ( #2882 )
8 years ago
Karthic Rao
8f4cf2a7d0
tests: anonymous/unsigned tests for object handler API's . ( #2881 )
8 years ago
Karthic Rao
30183c4a9a
tests: cleanup and unsigned request test. ( #2880 )
...
- Cleaning up of ListMultipartUpload API test for improving readability,
code maintainance and extensibility.
- Moving ListMultipartUploads to Go 1.7 sub tests.
- Using the new Anonymous request helper function for
ListMultipartUploads.
8 years ago
Karthic Rao
d1df5e0ae1
tests: Add helper function for API handler anonymous request tests. ( #2876 )
...
- Add helper function for API handler anonymous request tests.
- Add PutObject Part Anonymous request case using the new helper
function to validate its functionality.
8 years ago
Karthic Rao
97f4989945
tests: cleaning up. ( #2875 )
...
- Clean up PutObjectPart and ListObjectPart API handler tests.
- Add more comments, make the tests more readable.
- Add verification for HTTP response status code.
- Initialize the test using object Layer.
- Move to Go 1.7 sub tests.
8 years ago
Karthic Rao
a8105ec068
- Test utility function for easy asserting of cases wherein objectLayer ( #2865 )
...
is `nil` in API handlers.
- Remove the existing tests for the `nil` check and use the new method
to test for object layer being `nil`.
8 years ago
Krishnan Parthasarathi
402c92beda
Add listObjectParts test w/ unknown request signature type ( #2847 )
8 years ago
Karthic Rao
6a9013b97c
misspell fixes. ( #2835 )
8 years ago
Krishnan Parthasarathi
73b50aea2d
Add preSign auth type tests for ListObjectPartsHandler and PutObjectPartHandler ( #2834 )
8 years ago
Krishnan Parthasarathi
4f902d42b2
Add unit-tests for ListObjectParts API handler ( #2826 )
...
* Add missing uploadID test
... make variables in test code unexported.
* Add ServerNotInitialized test for ListObjectPartsHandler
* Add tests for ListObjectParts with signatureV2 and Anonymous requests
* Add failure test cases for ListObjectParts
8 years ago
Krishna Srinivas
61a18ed48f
sha256: Verify sha256 along with md5sum, signature is verified on the request early. ( #2813 )
8 years ago
Krishnan Parthasarathi
ddeb8242d8
PutObjectPartHandler unit-tests ( #2810 )
8 years ago
Harshavardhana
5885ffc8ae
signature: Add legacy signature v2 support transparently. ( #2811 )
...
Add new tests as well.
8 years ago
Karthic Rao
b8903d842c
api/complete-multipart: fixes and tests. ( #2719 )
...
* api/complete-multipart: tests and simplification.
- Removing the logic of sending white space characters.
- Fix for incorrect HTTP response status for certain cases.
- Tests for New Multipart Upload and Complete Multipart Upload.
* tests: test for Delelete Object API handler
8 years ago
Harshavardhana
7d37dea449
tests: Add more streaming signature tests. ( #2713 )
...
Part fix for #2621
8 years ago
Karthic Rao
b247ec9352
tests: refactor object-handler tests. ( #2656 )
...
- Move the initialization to a common executor for object Layer API
tests.d
8 years ago
Anis Elleuch
239a34ca97
Add tests for regular and streaming v4 PutObject Handler ( #2618 )
8 years ago
Harshavardhana
bccf549463
server: Move all the top level files into cmd folder. ( #2490 )
...
This change brings a change which was done for the 'mc'
package to allow for clean repo and have a cleaner
github drop in experience.
8 years ago
karthic rao
10feb1af3f
tests: object handlers: Unit tests for Get and Copy Object handlers ( #2451 )
8 years ago