Frontend: Add support for adding servers
This commit is contained in:
25
frontend.pm
25
frontend.pm
@@ -297,6 +297,31 @@ sub sendBadRequest {
|
||||
$aClient->send($response);
|
||||
}
|
||||
|
||||
sub sendForbidden {
|
||||
my $aClient = $_[0];
|
||||
my $aMessage = $_[1];
|
||||
|
||||
my $content = "<h1>403 Forbidden</h1><h6>irclogger_web</h6>Error: $aMessage";
|
||||
my $response = getBaseResponse(403, "Forbidden");
|
||||
$response.="Content-Type: text/html, charset=utf-8\r\n";
|
||||
$response.="Content-Length: ".length($content)."\r\n\r\n";
|
||||
$response.=$content;
|
||||
$aClient->send($response);
|
||||
}
|
||||
|
||||
sub sendConflict {
|
||||
my $aClient = $_[0];
|
||||
my $aMessage = $_[1];
|
||||
|
||||
my $content = "<h1>409 Conflict</h1><h6>irclogger_web</h6>Error: $aMessage";
|
||||
my $response = getBaseResponse(409, "Conflict");
|
||||
$response.="Content-Type: text/html, charset=utf-8\r\n";
|
||||
$response.="Content-Length: ".length($content)."\r\n\r\n";
|
||||
$response.=$content;
|
||||
$aClient->send($response);
|
||||
|
||||
}
|
||||
|
||||
sub redirect {
|
||||
my $aClient = $_[0];
|
||||
my $aLocation = $_[1];
|
||||
|
||||
Reference in New Issue
Block a user