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

AWS S3 301 Moved Permanently handling #312

Closed
francisdb opened this issue May 29, 2017 · 1 comment
Closed

AWS S3 301 Moved Permanently handling #312

francisdb opened this issue May 29, 2017 · 1 comment
Milestone

Comments

@francisdb
Copy link
Contributor

The Alpakka S3 client currently silently ignores 301 responses that might occur when reading from the wrong region. The official client logs a warning in this case.

Would be nice if at least some warning/error were logged, I had to turn on debug logging for akka.http to see why my bucket listings were empty.
A automatic redirect follow + logged warning about performance is also am option.

(on the side, the official client also has a way to detect the correct bucket by providing the name: client.getBucketLocation(bucket))

16:42:44.082 DEBUG - a.h.impl.engine.client.PoolGateway   - (Re-)starting host connection pool to s3-eu-central-1.amazonaws.com:443
16:42:44.090 DEBUG - a.h.impl.engine.client.PoolGateway   - InputBuffer (max-open-requests = 32) now filled with 1 request after enqueuing GET /foo.plugins Empty
16:42:44.091 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] Unconnected -> Loaded(1)
16:42:44.091 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] <unconnected> Establishing connection...
16:42:44.093 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] <unconnected> pushing request to connection: GET /foo.plugins Empty
16:42:44.274 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] </192.168.1.149:52507->s3-eu-central-1.amazonaws.com:443> Received response: GET /foo.plugins Empty -> 301 Moved Permanently Chunked
16:42:44.279 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] </192.168.1.149:52507->s3-eu-central-1.amazonaws.com:443> Finished reading response entity for GET /foo.plugins Empty -> 301 Moved Permanently Chunked
16:42:44.279 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] Loaded(1) -> Idle
@2m 2m closed this as completed in cce820b Jun 29, 2017
2m added a commit that referenced this issue Jun 29, 2017
fix #312 don't accept s3 redirect responses as success
@2m 2m added this to the 0.10 milestone Jun 29, 2017
@francisdb
Copy link
Contributor Author

thanks

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

2 participants