rgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI

Fixes: #3735
Signed-off-by: caleb miles <caleb.miles@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sylvain Munaut 2013-01-07 13:13:49 +01:00 committed by Sage Weil
parent eba314a811
commit e1da85f286

View File

@ -1120,7 +1120,7 @@ RGWRESTMgr::~RGWRESTMgr()
int RGWREST::preprocess(struct req_state *s, RGWClientIO *cio)
{
s->cio = cio;
s->script_uri = s->env->get("SCRIPT_URI");
s->script_uri = s->env->get("SCRIPT_URI", "");
s->request_uri = s->env->get("REQUEST_URI");
int pos = s->request_uri.find('?');
if (pos >= 0) {