… | |
… | |
820 | send_response( hc, status, title, extraheads, form, arg ); |
820 | send_response( hc, status, title, extraheads, form, arg ); |
821 | |
821 | |
822 | #endif /* ERR_DIR */ |
822 | #endif /* ERR_DIR */ |
823 | } |
823 | } |
824 | |
824 | |
|
|
825 | void |
|
|
826 | httpd_send_err_blocked( httpd_conn* hc ) |
|
|
827 | { |
|
|
828 | #ifdef ERR_DIR |
|
|
829 | |
|
|
830 | char filename[1000]; |
|
|
831 | |
|
|
832 | /* Try virtual host error page. */ |
|
|
833 | if ( hc->hs->vhost && hc->hostdir[0] != '\0' ) |
|
|
834 | { |
|
|
835 | (void) my_snprintf( filename, sizeof(filename), |
|
|
836 | "%s/%s/err403blocked.html", hc->hostdir, ERR_DIR ); |
|
|
837 | if ( send_err_file( hc, 403, err403title, "", filename ) ) |
|
|
838 | return; |
|
|
839 | } |
|
|
840 | |
|
|
841 | /* Try server-wide error page. */ |
|
|
842 | (void) my_snprintf( filename, sizeof(filename), |
|
|
843 | "%s/err403blocked.html", ERR_DIR ); |
|
|
844 | if ( send_err_file( hc, 403, err403title, "", filename ) ) |
|
|
845 | return; |
|
|
846 | |
|
|
847 | /* Fall back on built-in error page. */ |
|
|
848 | send_response( hc, 403, err403title, "", err403form, "" ); |
|
|
849 | |
|
|
850 | #else /* ERR_DIR */ |
|
|
851 | |
|
|
852 | send_response( hc, 403, err403title, "", err403form, "" ); |
|
|
853 | |
|
|
854 | #endif /* ERR_DIR */ |
|
|
855 | } |
825 | |
856 | |
826 | #ifdef ERR_DIR |
857 | #ifdef ERR_DIR |
827 | static int |
858 | static int |
828 | send_err_file( httpd_conn* hc, int status, char* title, char* extraheads, char* filename ) |
859 | send_err_file( httpd_conn* hc, int status, char* title, char* extraheads, char* filename ) |
829 | { |
860 | { |