ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/thttpd/libhttpd.c
(Generate patch)

Comparing thttpd/libhttpd.c (file contents):
Revision 1.1 by root, Mon Jun 18 21:11:56 2001 UTC vs.
Revision 1.1.4.2 by root, Fri Jun 29 13:08:08 2001 UTC

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
825void
826httpd_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
827static int 858static int
828send_err_file( httpd_conn* hc, int status, char* title, char* extraheads, char* filename ) 859send_err_file( httpd_conn* hc, int status, char* title, char* extraheads, char* filename )
829 { 860 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines