- if(childhandle(ch, req, fd, NULL, NULL))
+ twd = NULL;
+ if((twd = ccf->path) != NULL) {
+ if(!strcmp(twd, ".")) {
+ twd = NULL;
+ } else if(strncmp(path, twd, strlen(twd)) || (path[strlen(twd)] != '/')) {
+ /* Should be an impossible case under the current (and
+ * foreseeable) scheme. */
+ simpleerror(fd, 500, "Server Error", "An internal server error occurred.");
+ return;
+ } else {
+ path = path + strlen(twd) + 1;
+ }
+ }
+ headappheader(req, "X-Ash-File", path);
+ if(childhandle(ch, req, fd, chinit, twd))