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 1.1.1 doesn't render custom endpoint correctly for getObjectMetadata #1919

Closed
relgames opened this issue Sep 8, 2019 · 7 comments
Closed
Labels
Milestone

Comments

@relgames
Copy link

relgames commented Sep 8, 2019

I'm using a custom s3 implementation and trying to use getObjectMetadata().
It fails on alpakka s3 1.1.1 and 1.1.0 but works on 1.0.2.

Versions used

Akka version: 2.5.23
Akka http version: 10.1.8
Alpakka s3 version: 1.1.1 or 1.1.0

Expected Behavior

getObjectMetadata() succeeds for custom endpointUrl

Actual Behavior

getObjectMetadata() fails for custom endpointUrl

Relevant logs

With trace logging enabled, it renders HEAD request including a custom endpoint:

vax.net.ssl|DEBUG|1F|default-akka.actor.default-dispatcher-17|2019-09-08 17:33:23.454 CEST|SSLCipher.java:1727|Plaintext before ENCRYPTION (
  0000: 48 45 41 44 20 68 74 74   70 73 3A 2F 2F 73 33 2E  HEAD https://s3.
  0010: 6E 6C 2D 61 6D 73 2E 73   63 77 2E 63 6C 6F 75 64  nl-ams.scw.cloud
  0020: 2F 66 73 2D 63 6F 70 79   2E 65 61 74 65 6C 6C 69  /fs-copy.eatelli
  0030: 61 2E 63 6F 6D 2F 31 2F   74 68 75 6D 62 5F 36 30  a.com/1/thumb_60
  0040: 30 2E 6A 70 67 20 48 54   54 50 2F 31 2E 31 0D 0A  0.jpg HTTP/1.1..

So it renders full endpoint as part of HEAD request. While it should only render relative path, not the full path. It works fine in v1.0.2

@ennru ennru added the p:aws-s3 label Sep 9, 2019
@ennru
Copy link
Member

ennru commented Sep 9, 2019

Thank you for this report with a proper investigation of the problem.
Would you be able to suggest a fix in a Pull request?

@relgames
Copy link
Author

relgames commented Sep 9, 2019

I can try. Can you suggest where it is happening - rendering of endpoint into HEAD request?
Are there unit tests so I can reproduce the issue with a test first?..

@jrudolph
Copy link
Member

Likely culprit: 3e98c1c

@ennru
Copy link
Member

ennru commented Sep 10, 2019

With @jrudolph's help, I have a fix incoming. Amazon S3's non-standard HTTP continues to annoy.
I guess we'll need to cut an Alpakka 1.1.2 release with the fix.

@ennru
Copy link
Member

ennru commented Sep 12, 2019

Snapshots after 1.1.1+76-b22a8117 contain the fix from #1923.
@relgames Can you give it a try?
See https://doc.akka.io/docs/alpakka/snapshot/other-docs/snapshots.html for instructions.

@relgames
Copy link
Author

@ennru tested 1.1.1+77-befcda8f - it works, thanks a lot!!

@ennru
Copy link
Member

ennru commented Sep 14, 2019

Thank you for the feedback on this. We'll discuss if we need to cut another release.
Fixed with #1923

@ennru ennru closed this as completed Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants