Browse Source

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

personal/stbuehler/wip
Stefan Bühler 13 years ago
parent
commit
41d0490534
  1. 2
      src/main/request.c
  2. 4
      src/modules/mod_fastcgi.c

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

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

Loading…
Cancel
Save