--- thttpd/libhttpd.c 2001/06/18 21:11:56 1.1 +++ thttpd/libhttpd.c 2001/06/29 13:08:08 1.1.4.2 @@ -822,6 +822,37 @@ #endif /* ERR_DIR */ } +void +httpd_send_err_blocked( httpd_conn* hc ) + { +#ifdef ERR_DIR + + char filename[1000]; + + /* Try virtual host error page. */ + if ( hc->hs->vhost && hc->hostdir[0] != '\0' ) + { + (void) my_snprintf( filename, sizeof(filename), + "%s/%s/err403blocked.html", hc->hostdir, ERR_DIR ); + if ( send_err_file( hc, 403, err403title, "", filename ) ) + return; + } + + /* Try server-wide error page. */ + (void) my_snprintf( filename, sizeof(filename), + "%s/err403blocked.html", ERR_DIR ); + if ( send_err_file( hc, 403, err403title, "", filename ) ) + return; + + /* Fall back on built-in error page. */ + send_response( hc, 403, err403title, "", err403form, "" ); + +#else /* ERR_DIR */ + + send_response( hc, 403, err403title, "", err403form, "" ); + +#endif /* ERR_DIR */ + } #ifdef ERR_DIR static int