Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15290/UI
Modified Files:
HTTP.pm
Log Message:
Add a nicer error page when we are reporting 404 etc.
Index: HTTP.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTTP.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** HTTP.pm 19 Dec 2005 11:41:53 -0000 1.33
--- HTTP.pm 20 Dec 2005 19:26:02 -0000 1.34
***************
*** 397,401 ****
$self->log_( 0, "HTTP error $error returned" );
! print $client "HTTP/1.0 $error Error$eol$eol";
}
--- 397,417 ----
$self->log_( 0, "HTTP error $error returned" );
! my $text="<html><head><title>POPFile Web Server Error $error</title></head>
! <body>
! <h1>POPFile Web Server Error $error</h1>
! An error has occurred which has caused POPFile to return the error $error.
! <p>
! Click <a href=\"/\">here</a> to continue.
! </body>
! </html>$eol";
!
! $self->log_( 1, $text );
!
! print $client "HTTP/1.0 200 OK$eol";
! print $client "Content-Type: text/html$eol";
! print $client "Content-Length: ";
! print $client length( $text );
! print $client "$eol$eol";
! print $client $text;
}
***************
*** 436,440 ****
print $client $header . $contents;
} else {
! http_error_( $self, $client, 404 );
}
}
--- 452,456 ----
print $client $header . $contents;
} else {
! $self->http_error_( $client, 404 );
}
}
|