-
Notifications
You must be signed in to change notification settings - Fork 684
aws/ec2metadata: Avoid unnecessary redirect #198
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
Comments
I had a thought that maybe in v2, there is no need for an Anyway, just a thought. :) |
Agreed, one of the the ways to address this is using URI.ResolveReference. This method will preserve trailing slashes when joining components of a URI path. I think using ResolveReference for v2 would be the best approach. And probably should be applied to how the SDK computes URIs in general. |
Hi @jasdel, I just gave URL.ResolveReference a quick try, and I'm not sure if it will produce the results you want. See https://play.golang.org/p/TrL2Jas6CKw
I think you want |
V2 port of the v1 SDK's aws-sdk-go#2037. Removes unneeded redirect when making ec2 metadata calls for ec2 instance roll credentials.
The text was updated successfully, but these errors were encountered: