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
rgw: adjust the request_uri to support absoluteURI of http request #5774
Conversation
59e5a0a
to
9bb9260
Compare
Hi, @dachary |
@VMCloud thanks :-) |
static string get_abs_path(const string &request_uri) { | ||
int beg_pos = request_uri.find("://") + 3; | ||
int len = request_uri.size(); | ||
while(beg_pos < len) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use find here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is a good suggestion.
9bb9260
to
625f629
Compare
26dc423
to
e34cead
Compare
e34cead
to
4e12251
Compare
http://tracker.ceph.com/issues/12917 Fixes: ceph#12917 Signed-off-by: Wenjun Huang <wenjunhuang@tencent.com>
4e12251
to
63be569
Compare
@cbodley @yehudasa @mattbenjamin needs review? |
// S3 authorization and some other processes depending on the requestURI | ||
// The absoluteURI can start with "http://", "https://", "ws://" or "wss://" | ||
static string get_abs_path(const string& request_uri) { | ||
const string ABS_PREFIXS[] = {"http://", "https://", "ws://", "wss://"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this array static so we don't construct the std::strings on every call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good advice!
Have made the const array static |
@VMCloud did you removed your remote branch of wip-12917 by accident? as a side effect, it closes the pull request automatically. |
@tchaikov yes, I am trying to reopen it. |
I have recreate a PR for this bug: #7675 |
http://tracker.ceph.com/issues/12917 Fixes: #12917
Signed-off-by: Wenjun Huang wenjunhuang@tencent.com