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: fix opslog can't record referrer when using curl as client #16863
Conversation
975e5dd
to
dda244d
Compare
@joscollin mind to take a look? Thx. |
@@ -346,7 +346,11 @@ int rgw_log_op(RGWRados *store, RGWREST* const rest, struct req_state *s, | |||
else | |||
set_param_str(s, "REMOTE_ADDR", entry.remote_addr); | |||
set_param_str(s, "HTTP_USER_AGENT", entry.user_agent); | |||
set_param_str(s, "HTTP_REFERRER", entry.referrer); |
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.
I think this can be fixed as HTTP_REFERER
for now and do the entire misspelling clean up as a different PR. Because after we fix the misspelling, the below logic won't be needed at all. What do you say ?
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.
As AWS S3 are using referrer
(see http://docs.aws.amazon.com/AmazonS3/latest/dev/LogFormat.html Referrer Section), rgw are correctly following this convention, but curl -e option are still using misspelling referer
. I think it's a problem of legacy client, this purpose of this pr is to improve the rgw compatibility.
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.
makes sense
dda244d
to
4479a1e
Compare
Fixes: http://tracker.ceph.com/issues/20935 Reported-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com> Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
4479a1e
to
23323b7
Compare
Jenkins, retest this please. |
1 similar comment
Jenkins, retest this please. |
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.
LGTM
Jenkins retest this please |
Fixes: http://tracker.ceph.com/issues/20935
Signed-off-by: Jiaying Ren jiaying.ren@umcloud.com