removed non-working dns resolver cache

This commit is contained in:
Rudis Muiznieks 2020-07-23 21:27:32 -05:00
parent c5c7150748
commit 00537430a9
2 changed files with 3 additions and 11 deletions

View File

@ -41,19 +41,9 @@ if (defined $ENV{'LOCAL_DOMAINS'}) {
package DotplanApi; package DotplanApi;
use base qw(HTTP::Server::Simple::CGI); use base qw(HTTP::Server::Simple::CGI);
sub net_server { 'Net::Server::Fork' } sub net_server { 'Net::Server::Fork' }
use HTTP::Server::Simple::Static;
my $webroot = './static'; my $webroot = './static';
# Caching DNS resolver use HTTP::Server::Simple::Static;
{
package Net::DNS::Resolver;
my %cache;
sub query {
my $self = shift;
$cache{"@_"} ||= $self->SUPER::query(@_);
}
}
use IPC::Run; use IPC::Run;
use DBI; use DBI;
use File::Temp qw(tempfile); use File::Temp qw(tempfile);

View File

@ -322,6 +322,8 @@ now=`perl -e 'use HTTP::Date; print HTTP::Date::time2str(time)'`
curl_test 'If-Modified-Since header' 304 'text/plain' -H 'Accept: text/*' -H "If-Modified-Since: $now" localhost:$PORT/plan/$TEST_USER \ curl_test 'If-Modified-Since header' 304 'text/plain' -H 'Accept: text/*' -H "If-Modified-Since: $now" localhost:$PORT/plan/$TEST_USER \
&& assert_equal 'Empty content' "$TEST_CONTENT" "" && assert_equal 'Empty content' "$TEST_CONTENT" ""
curl_test 'Static index' 200 'text/html' localhost:$PORT/
############### ###############
# Test Teardown # Test Teardown
############### ###############