Open
Conversation
raven-chen
reviewed
Aug 2, 2018
| return err | ||
| } | ||
| req.Header.Set("Host", client.GetEndpoint()) | ||
| req.Header.Set("Host", client.getHost()) |
Member
There was a problem hiding this comment.
What's the benefit of returning the URL in a fixed format rather than the current GetEndpoint implementation?
Actually, could you describe what is the problem and how you fixed it?
Author
There was a problem hiding this comment.
req.Header.Set("Host", client.getHost())
腾讯 cos host字段值设置成加速域名地址时报错,host只能是xxxx-123456.cos.ap-guangzhou.myqcloud.com格式的
client.GetEndpoint() 方法返回的是用户设置地址既可以是xxxx-123456.cos.ap-guangzhou.myqcloud.com 格式的,也可以是自己加速域名的地址。
client.getHost()方法返回的是xxxx-123456.cos.ap-guangzhou.myqcloud.com 格式的地址
Member
There was a problem hiding this comment.
既然 client.GetEndpoint() 可以被用户设置 那看起来已经足以满足要求了?
Author
There was a problem hiding this comment.
req.Header.Set("Host", client.GetEndpoint()) 不能使用用户设置的域名
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix tencent endpoint bug