2
0
Fork 0

Use raw uri for orig-uri and REQUEST_URI/REDIRECT_URI in fastcgi

personal/stbuehler/wip
Stefan Bühler 2009-09-09 00:56:59 +02:00
parent 374ebbeff7
commit 41d0490534
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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));