Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[S3] 'response-content-encoding' not working for GetObject #1487

Closed
wsj0000 opened this issue Sep 24, 2020 · 0 comments
Closed

[S3] 'response-content-encoding' not working for GetObject #1487

wsj0000 opened this issue Sep 24, 2020 · 0 comments

Comments

@wsj0000
Copy link

wsj0000 commented Sep 24, 2020

Version: 2.00
I was executing get-object from aws-cli with response header override flag --response-content-encoding gzip expecting compressing when transporting. The command is here:

aws --endpoint-url http://object.wsj.local s3api get-object --bucket asset-pool --key test --response-content-encoding gzip test --debug

But it seem not working. The log is here:

2020-09-24 14:20:07,895 - MainThread - botocore.hooks - DEBUG - Event before-sign.s3.GetObject: calling handler <bound method S3EndpointSetter.set_endpoint of <botocore.utils.S3EndpointSetter object at 0x0000022585216CC8>>
2020-09-24 14:20:07,895 - MainThread - botocore.utils - DEBUG - Using S3 path style addressing.
2020-09-24 14:20:07,896 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2020-09-24 14:20:07,896 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
GET
/asset-pool/test
response-content-encoding=gzip
host:object.wsj.local
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20200924T062007Z

host;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2020-09-24 14:20:07,897 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20200924T062007Z
20200924/chubaofs01/s3/aws4_request
5b556fc39e2a2761a645d59d4347dcf1c0138570e7235a573839e4f596bcffab
2020-09-24 14:20:07,897 - MainThread - botocore.auth - DEBUG - Signature:
58c8396cf087c240c4312656653485ada02639ace7d5ae51a290388aacd964df
2020-09-24 14:20:07,897 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=True, method=GET, url=http://object.wsj.local/asset-pool/test?response-content-encoding=gzip, headers={'User-Agent': b'aws-cli/2.0.44 Python/3.7.7 Windows/10 exe/AMD64 command/s3api.get-object', 'X-Amz-Date': b'20200924T062007Z', 'X-Amz-Content-SHA256': b'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': b'AWS4-HMAC-SHA256 Credential=LTAImYk9UOgluhgx/20200924/chubaofs01/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=58c8396cf087c240c4312656653485ada02639ace7d5ae51a290388aacd964df'}>
2020-09-24 14:20:07,898 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): object.wsj.local:80
2020-09-24 14:20:07,940 - MainThread - urllib3.connectionpool - DEBUG - http://object.wsj.local:80 "GET /asset-pool/test?response-content-encoding=gzip HTTP/1.1" 200 5447
2020-09-24 14:20:07,940 - MainThread - botocore.parsers - DEBUG - Response headers: {'Accept-Ranges': 'bytes', 'Content-Disposition': 'inline; filename="test"', 'Content-Length': '5447', 'Content-Type': 'text/plain; charset=utf-8', 'Date': 'Thu, 24 Sep 2020 06:20:06 GMT', 'Etag': '"ba5ec2f670ed8438ea9c281cd0673156"', 'Last-Modified': 'Wed, 23 Sep 2020 13:34:01 GMT', 'Server': 'SeaweedFS Filer 30GB 2.00'}
2020-09-24 14:20:07,941 - MainThread - botocore.parsers - DEBUG - Response body:
<botocore.response.StreamingBody object at 0x0000022585247A08>
2020-09-24 14:20:07,942 - MainThread - botocore.hooks - DEBUG - Event needs-retry.s3.GetObject: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x0000022585216B48>>
2020-09-24 14:20:07,944 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2020-09-24 14:20:07,944 - MainThread - botocore.hooks - DEBUG - Event needs-retry.s3.GetObject: calling handler <bound method S3RegionRedirector.redirect_from_error of <botocore.utils.S3RegionRedirector object at 0x00000225852167C8>>
2020-09-24 14:20:07,945 - MainThread - botocore.hooks - DEBUG - Event after-call.s3.GetObject: calling handler <bound method StreamingOutputArgument.save_file of <awscli.customizations.streamingoutputarg.StreamingOutputArgument object at 0x0000022584DBDD08>>
2020-09-24 14:20:07,951 - MainThread - botocore.hooks - DEBUG - Event after-call.s3.GetObject: calling handler <function enhance_error_msg at 0x0000022584CA6708>
2020-09-24 14:20:07,952 - MainThread - botocore.hooks - DEBUG - Event after-call.s3.GetObject: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x0000022585216548>>
{
    "AcceptRanges": "bytes",
    "LastModified": "2020-09-23T13:34:01+00:00",
    "ContentLength": 5447,
    "ETag": "\"ba5ec2f670ed8438ea9c281cd0673156\"",
    "ContentDisposition": "inline; filename=\"test\"",
    "ContentType": "text/plain; charset=utf-8",
    "Metadata": {}
}

The response did't represent Content-Encoding with gzip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant