Fix double slash after docroot

personal/stbuehler/wip
Stefan Bühler 13 years ago
parent e762ac1208
commit 2304093289
  1. 3
      src/main/plugin_core.c

@ -162,7 +162,8 @@ static liHandlerResult core_handle_docroot(liVRequest *vr, gpointer param, gpoin
/* build physical path: docroot + uri.path */
g_string_truncate(vr->physical.path, 0);
g_string_append_len(vr->physical.path, GSTR_LEN(vr->physical.doc_root));
li_path_append_slash(vr->physical.path);
if (vr->request.uri.path->len == 0 || vr->request.uri.path->str[0] != '/')
li_path_append_slash(vr->physical.path);
g_string_append_len(vr->physical.path, GSTR_LEN(vr->request.uri.path));
VR_DEBUG(vr, "physical path: %s", vr->physical.path->str);

Loading…
Cancel
Save