2
0
Fork 0

Fix pathinfo; action to remove the pathinfo from the url too (for SCRIPT_NAME)

personal/stbuehler/wip
Stefan Bühler 2010-05-01 11:51:34 +02:00
parent 67e940676d
commit 46b9a28f87
1 changed files with 8 additions and 0 deletions

View File

@ -641,6 +641,14 @@ next_round:
VR_DEBUG(vr, "stat: physical path: %s", vr->physical.path->str);
}
res = li_stat_cache_get(vr, vr->physical.path, &st, &err, NULL);
if (res == LI_HANDLER_GO_ON) {
if (vr->physical.pathinfo->len > 0) {
/* remove PATHINFO from url too ("SCRIPT_NAME") */
if (li_string_suffix(vr->request.uri.path, GSTR_LEN(vr->physical.pathinfo))) {
g_string_set_size(vr->request.uri.path, vr->request.uri.path->len - vr->physical.pathinfo->len);
}
}
}
if (res == LI_HANDLER_WAIT_FOR_EVENT || res == LI_HANDLER_GO_ON)
return res;