diff --git a/src/main/request.c b/src/main/request.c index ab0dda0..5dba858 100644 --- a/src/main/request.c +++ b/src/main/request.c @@ -80,7 +80,7 @@ static gboolean request_parse_url(liVRequest *vr) { li_path_simplify(req->uri.path); if (0 == req->uri.orig_path->len) { - g_string_append_len(req->uri.orig_path, GSTR_LEN(req->uri.path)); /* save orig path */ + g_string_append_len(req->uri.orig_path, GSTR_LEN(req->uri.raw)); /* save orig raw uri */ } return TRUE; diff --git a/src/modules/mod_fastcgi.c b/src/modules/mod_fastcgi.c index 968e77a..94ea494 100644 --- a/src/modules/mod_fastcgi.c +++ b/src/modules/mod_fastcgi.c @@ -381,8 +381,8 @@ static void fastcgi_env_create(liVRequest *vr, liEnvironmentDup *envdup, GByteAr fastcgi_env_add(buf, envdup, CONST_STR_LEN("DOCUMENT_ROOT"), GSTR_LEN(vr->physical.doc_root)); fastcgi_env_add(buf, envdup, CONST_STR_LEN("REQUEST_URI"), GSTR_LEN(vr->request.uri.orig_path)); - if (!g_string_equal(vr->request.uri.orig_path, vr->request.uri.path)) { - fastcgi_env_add(buf, envdup, CONST_STR_LEN("REDIRECT_URI"), GSTR_LEN(vr->request.uri.path)); + if (!g_string_equal(vr->request.uri.orig_path, vr->request.uri.raw)) { + fastcgi_env_add(buf, envdup, CONST_STR_LEN("REDIRECT_URI"), GSTR_LEN(vr->request.uri.raw)); } fastcgi_env_add(buf, envdup, CONST_STR_LEN("QUERY_STRING"), GSTR_LEN(vr->request.uri.query));