]> www.dolda2000.com Git - ashd.git/commitdiff
Send 404 for files with no matches.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 24 Aug 2010 23:00:43 +0000 (01:00 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 24 Aug 2010 23:00:43 +0000 (01:00 +0200)
src/dirplex.c

index 0472159577b6793a9ef839010735df328640dc60..46342830c55b380499b8b068a431577f2e9287b9 100644 (file)
@@ -345,7 +345,7 @@ static void handlefile(struct hthead *req, int fd, char *path)
 
     headappheader(req, "X-Ash-File", path);
     if(((pat = findmatch(path, 0)) == NULL) && ((pat = findmatch(path, 1)) == NULL)) {
-       /* XXX: Send a 500 error? 404? */
+       simpleerror(fd, 404, "Not Found", "The requested URL has no corresponding resource.");
        return;
     }
     if((ch = findchild(path, pat->childnm)) == NULL) {