aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck_speedtest_servers8
1 files changed, 6 insertions, 2 deletions
diff --git a/check_speedtest_servers b/check_speedtest_servers
index 7148938..81c5b17 100755
--- a/check_speedtest_servers
+++ b/check_speedtest_servers
@@ -79,10 +79,14 @@ eval {
# Build a user agent that accepts only XML
my $ua = LWP::UserAgent->new();
- $ua->default_header( Accept => 'application/xml;text/xml' );
# Attempt to retrieve the server list
- my $response = $ua->get($SERVERS_LIST_URL);
+ my $headers = HTTP::Headers->new(
+ 'Accept' => 'application/xml;text/xml',
+ 'Accept-Encoding' => scalar HTTP::Message::decodable(),
+ );
+ my $request = HTTP::Request->new( 'GET', $SERVERS_LIST_URL, $headers );
+ my $response = $ua->request($request);
$response->is_success
or die "$response->status_line\n";