You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if port != "" && isDefaultPort(r.URL.Scheme, port) {
r.Host = stripPort(host)
}
What this means is that if I get a Host of localhost:8080 for example, the port will NOT be stripped for AWS Golang SDK. However, I note that in the curl implementation, they do strip the port in this case (and perhaps others). I see nothing in Creating a Signed Request about this, so it's not clear to me whether the port should be stripped or not, and what the rationale is. This makes me question whether the writer of this code actually just forgot to put !isDefaultPort in the above code?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Noting this code from AWS Signer v4 code:
What this means is that if I get a
Host
oflocalhost:8080
for example, the port will NOT be stripped for AWS Golang SDK. However, I note that in thecurl
implementation, they do strip the port in this case (and perhaps others). I see nothing in Creating a Signed Request about this, so it's not clear to me whether the port should be stripped or not, and what the rationale is. This makes me question whether the writer of this code actually just forgot to put!isDefaultPort
in the above code?Beta Was this translation helpful? Give feedback.
All reactions