From e1da85f286838cdd3a6329840cec748c6a11fd26 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Mon, 7 Jan 2013 13:13:49 +0100 Subject: [PATCH] rgw: Fix crash when FastCGI frontend doesn't set SCRIPT_URI Fixes: #3735 Signed-off-by: caleb miles Reviewed-by: Sage Weil --- src/rgw/rgw_rest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index c8c0bacf0a0..2c80248286d 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -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) {