- tmp = sstrdup(path);
- ch = findchild(tmp, ".notfound", &ccf);
- if(childhandle(ch, req, fd, chinit, ccf?ccf->path:NULL))
- childerror(req, fd);
- free(tmp);
+ char tmp[strlen(path) + 1];
+ strcpy(tmp, path);
+ if((pat = findmatch(tmp, 0, PT_NOTFOUND)) != NULL) {
+ handle(req, fd, tmp, pat);
+ } else {
+ ch = findchild(tmp, ".notfound", &ccf);
+ if(childhandle(ch, req, fd, chinit, ccf?ccf->path:NULL))
+ childerror(req, fd);
+ }