Skip to content

Commit

Permalink
rgw: set default value for env->get() call
Browse files Browse the repository at this point in the history
Fixes: ceph#13239

This fixes a regression introduced at commit abe4ec2.
The host var is a string, env->get() returns a char pointer, shouldn't
pass in NULL.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
  • Loading branch information
yehudasa committed Sep 25, 2015
1 parent 9c9514f commit 0d5730e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rgw/rgw_common.cc
Expand Up @@ -99,7 +99,7 @@ is_err() const


req_info::req_info(CephContext *cct, class RGWEnv *e) : env(e) {
method = env->get("REQUEST_METHOD");
method = env->get("REQUEST_METHOD", "");
script_uri = env->get("SCRIPT_URI", cct->_conf->rgw_script_uri.c_str());
request_uri = env->get("REQUEST_URI", cct->_conf->rgw_request_uri.c_str());
int pos = request_uri.find('?');
Expand All @@ -109,7 +109,7 @@ req_info::req_info(CephContext *cct, class RGWEnv *e) : env(e) {
} else {
request_params = env->get("QUERY_STRING", "");
}
host = env->get("HTTP_HOST");
host = env->get("HTTP_HOST", "");

// strip off any trailing :port from host (added by CrossFTP and maybe others)
size_t colon_offset = host.find_last_of(':');
Expand Down

0 comments on commit 0d5730e

Please sign in to comment.