Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24153/UI
Modified Files:
Tag: b0_22_2
HTTP.pm
Log Message:
Add a nicer error page when we are reporting 404 etc. (from John's patch for 0.23)
Index: HTTP.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTTP.pm,v
retrieving revision 1.27.4.1
retrieving revision 1.27.4.2
diff -C2 -d -r1.27.4.1 -r1.27.4.2
*** HTTP.pm 6 Feb 2006 15:15:54 -0000 1.27.4.1
--- HTTP.pm 8 Feb 2006 06:49:27 -0000 1.27.4.2
***************
*** 330,334 ****
$self->log_( 0, "HTTP error $error returned" );
! print $client "HTTP/1.0 $error Error$eol$eol";
}
--- 330,350 ----
$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;
}
***************
*** 378,382 ****
print $client $header . $contents;
} else {
! http_error_( $self, $client, 404 );
}
}
--- 394,398 ----
print $client $header . $contents;
} else {
! $self->http_error_( $client, 404 );
}
}
|