File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030#include "network.h"
3131#include "utils.h"
3232#include "conf.h"
33+ #include "log.h"
3334
3435#include <regex.h>
3536
@@ -188,8 +189,12 @@ int send_http_error_message (struct conn_s *connptr)
188189 connptr -> error_string , add );
189190
190191 error_file = get_html_file (connptr -> error_number );
191- if (!(infile = fopen (error_file , "r" ))) {
192- char * detail = lookup_variable (connptr -> error_variables , "detail" );
192+ if (!error_file || !(infile = fopen (error_file , "r" ))) {
193+ char * detail ;
194+ if (error_file ) log_message (LOG_ERR ,
195+ "Error opening error file '%s' (%s)" ,
196+ error_file , strerror (errno ));
197+ detail = lookup_variable (connptr -> error_variables , "detail" );
193198 return (write_message (connptr -> client_fd , fallback_error ,
194199 connptr -> error_number ,
195200 connptr -> error_string ,
You can’t perform that action at this time.
0 commit comments