… | |
… | |
823 | } |
823 | } |
824 | |
824 | |
825 | void |
825 | void |
826 | httpd_send_err_blocked( httpd_conn* hc ) |
826 | httpd_send_err_blocked( httpd_conn* hc ) |
827 | { |
827 | { |
|
|
828 | char *protocol = hc->protocol; |
|
|
829 | |
828 | #ifdef ERR_DIR |
830 | #ifdef ERR_DIR |
829 | |
|
|
830 | char filename[1000]; |
831 | char filename[1000]; |
|
|
832 | #endif |
831 | |
833 | |
|
|
834 | hc->protocol = "HTTP/1.0"; |
|
|
835 | |
|
|
836 | #ifdef ERR_DIR |
832 | /* Try virtual host error page. */ |
837 | /* Try virtual host error page. */ |
833 | if ( hc->hs->vhost && hc->hostdir[0] != '\0' ) |
838 | if ( hc->hs->vhost && hc->hostdir[0] != '\0' ) |
834 | { |
839 | { |
835 | (void) my_snprintf( filename, sizeof(filename), |
840 | (void) my_snprintf( filename, sizeof(filename), |
836 | "%s/%s/err403blocked.html", hc->hostdir, ERR_DIR ); |
841 | "%s/%s/err403blocked.html", hc->hostdir, ERR_DIR ); |
… | |
… | |
850 | #else /* ERR_DIR */ |
855 | #else /* ERR_DIR */ |
851 | |
856 | |
852 | send_response( hc, 403, err403title, "", err403form, "" ); |
857 | send_response( hc, 403, err403title, "", err403form, "" ); |
853 | |
858 | |
854 | #endif /* ERR_DIR */ |
859 | #endif /* ERR_DIR */ |
|
|
860 | hc->protocol = protocol; |
855 | } |
861 | } |
856 | |
862 | |
857 | #ifdef ERR_DIR |
863 | #ifdef ERR_DIR |
858 | static int |
864 | static int |
859 | send_err_file( httpd_conn* hc, int status, char* title, char* extraheads, char* filename ) |
865 | send_err_file( httpd_conn* hc, int status, char* title, char* extraheads, char* filename ) |
… | |
… | |
3678 | char bytes[40]; |
3684 | char bytes[40]; |
3679 | |
3685 | |
3680 | if ( hc->hs->no_log ) |
3686 | if ( hc->hs->no_log ) |
3681 | return; |
3687 | return; |
3682 | |
3688 | |
|
|
3689 | /* don't log UNKNOWN protocol requests (blocks etc..) */ |
|
|
3690 | if ( hc->method == METHOD_UNKNOWN ) |
|
|
3691 | return; |
|
|
3692 | |
3683 | /* This is straight CERN Combined Log Format - the only tweak |
3693 | /* This is straight CERN Combined Log Format - the only tweak |
3684 | ** being that if we're using syslog() we leave out the date, because |
3694 | ** being that if we're using syslog() we leave out the date, because |
3685 | ** syslogd puts it in. The included syslogtocern script turns the |
3695 | ** syslogd puts it in. The included syslogtocern script turns the |
3686 | ** results into true CERN format. |
3696 | ** results into true CERN format. |
3687 | */ |
3697 | */ |