X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fpatplex.c;h=d0e2dade2fff96eca07c407fc34c857e633af452;hp=692d48021380a1c73105699a1e6e03583d6d722b;hb=f2f009c95982947f3cd99567a17bbb65120fa741;hpb=8240565929c54d87883659f41ceef717bcdfa4b7 diff --git a/src/patplex.c b/src/patplex.c index 692d480..d0e2dad 100644 --- a/src/patplex.c +++ b/src/patplex.c @@ -472,6 +472,14 @@ static struct pattern *findmatch(struct config *cf, struct hthead *req, int tryd return(NULL); } +static void childerror(struct hthead *req, int fd) +{ + if(errno == EAGAIN) + simpleerror(fd, 500, "Server Error", "The request handler is overloaded."); + else + simpleerror(fd, 500, "Server Error", "The request handler crashed."); +} + static void serve(struct hthead *req, int fd) { struct pattern *pat; @@ -511,7 +519,7 @@ static void serve(struct hthead *req, int fd) headappheader(req, head->name, head->value); } if(childhandle(ch, req, fd, NULL, NULL)) - simpleerror(fd, 500, "Server Error", "The request handler crashed."); + childerror(req, fd); } static void reloadconf(char *nm)