MT#8507 Remove libdigest-sha3-perl dependency.

The code was commented out anyways, so it's just removed entirely.
agranig/webphone
Andreas Granig 12 years ago
parent 578a307542
commit 24c30fae21

1
debian/control vendored

@ -102,7 +102,6 @@ Depends: gettext,
libdatetime-format-rfc3339-perl,
libdatetime-perl,
libdbix-class-resultset-recursiveupdate-perl (>= 0.30~),
libdigest-sha3-perl,
libemail-mime-perl,
libemail-send-perl,
libemail-sender-perl,

@ -270,46 +270,6 @@ sub require_wellformed_json {
return $ret;
}
=pod
# don't use caching for now, keep it as simple as possible
sub cached {
my ($self, $c) = @_;
my $response = $c->cache->get($c->request->uri->canonical->as_string);
unless ($response) {
$c->log->info('not cached');
return;
}
my $matched_tag = $c->request->header('If-None-Match') && ('*' eq $c->request->header('If-None-Match'))
|| (grep {$response->header('ETag') eq $_} Data::Record->new({
split => qr/\s*,\s*/, unless => $RE{delimited}{-delim => q(")},
})->records($c->request->header('If-None-Match')));
my $not_modified = $c->request->header('If-Modified-Since')
&& !($self->last_modified < DateTime::Format::HTTP->parse_datetime($c->request->header('If-Modified-Since')));
if (
$matched_tag && $not_modified
|| $matched_tag
|| $not_modified
) {
$c->response->status(HTTP_NOT_MODIFIED);
$c->response->headers($response->headers);
$c->log->info('cached');
return 1;
}
$c->log->info('stale');
return;
}
sub etag {
my ($self, $octets) = @_;
return sprintf '"ni:/sha3-256;%s"', sha3_256_base64($octets);
}
sub expires {
my ($self) = @_;
return DateTime->now->clone->add(years => 1); # XXX insert product end-of-life
}
=cut
sub allowed_methods {
my ($self) = @_;
my $meta = $self->meta;

Loading…
Cancel
Save