allow invalid auth header for presigned urls
I have a case where I upload files with presigned links and my requests already contain Authentication header for another application. The app is tested against regular s3, which ignores the header and parses info from presigned link. s3proxy only parses parameters from url if the Authentication header is not present. I suggest we change the behavior to mimick s3 better: we will will try to construct S3AuthorizationHeader from Auth header and if it fails or header is not present try to parse url parameters.
Please address the Checkstyle and s3-tests failures:
======================================================================
FAIL: s3tests.functional.test_headers.test_object_create_bad_authorization_invalid_aws2
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/gaul/work/s3proxy/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 170, in runTest
self.test(*self.arg)
File "/home/gaul/work/s3proxy/s3-tests/s3tests/functional/test_headers.py", line 414, in test_object_create_bad_authorization_invalid_aws2
eq(e.status, 400)
AssertionError: 403 != 400
======================================================================
FAIL: s3tests.functional.test_headers.test_bucket_create_bad_authorization_invalid_aws2
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/gaul/work/s3proxy/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 170, in runTest
self.test(*self.arg)
File "/home/gaul/work/s3proxy/s3-tests/s3tests/functional/test_headers.py", line 443, in test_bucket_create_bad_authorization_invalid_aws2
eq(e.status, 400)
AssertionError: 403 != 400
@RunFMe Can you fix the test failures as I suggested? I plan to run a release this weekend.
@RunFMe could you finish this PR?