Use raw uri for orig-uri and REQUEST_URI/REDIRECT_URI in fastcgi
This commit is contained in:
parent
374ebbeff7
commit
41d0490534
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue