diff -r 8ac56edb4e94 -r 3da1f7b6847f src/server/daemon/httprequest.c --- a/src/server/daemon/httprequest.c Tue Jan 01 14:02:25 2013 +0100 +++ b/src/server/daemon/httprequest.c Tue Jan 01 19:22:56 2013 +0100 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2011 Olaf Wintermann. All rights reserved. + * Copyright 2013 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -40,6 +40,7 @@ #include "config.h" #include "vserver.h" #include "httplistener.h" +#include "error.h" HTTPRequest *http_request_new() { HTTPRequest *req = malloc(sizeof(HTTPRequest)); @@ -357,7 +358,9 @@ } if(r == REQ_ABORTED) { - nsapi_error_request(sn, rq); + // if an error occurred, we send an error page + nsapi_error_request((Session*)sn, (Request*)rq); + break; } } while (r == REQ_RESTART); @@ -376,12 +379,6 @@ return 0; } -int nsapi_error_request(NSAPISession *sn, NSAPIRequest *rq) { - // TODO - - return REQ_PROCEED; -} - int nsapi_authtrans(NSAPISession *sn, NSAPIRequest *rq) { HTTPObjectConfig *objconf = rq->vs->objects; httpd_object *obj = objconf->objects[0];