From 6328b9cf2477049b377329f1059ef31111d054b0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 29 May 2010 21:15:04 +0200 Subject: Add --timeout switch, decrease default timeout from 180 to 60 seconds --- bin/efa | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/efa b/bin/efa index c59264e..92893a5 100755 --- a/bin/efa +++ b/bin/efa @@ -32,6 +32,7 @@ my $proximity; my $walk_speed; my $with_bike; my $debug = 0; +my $timeout = 60; my $ignore_info = 'Fahrradmitnahme'; my ($test_dump, $test_parse); @@ -221,6 +222,7 @@ GetOptions( 'test-dump' => \$test_dump, 'test-parse' => \$test_parse, 't|time=s' => \$time, + 'timeout=i' => \$timeout, 'to=s{2}' => \@to, 'to-type=s' => \$to_type, 'v|version' => sub {print "efa version $version\n"; exit 0}, @@ -370,6 +372,7 @@ if ($test_parse) { $content = ; } else { + $www->timeout($timeout); $www->get($firsturl); $www->submit_form( form_name => 'jp', @@ -537,6 +540,10 @@ Ignore additional information matching I (default: /Fahrradmitnahme/) If I is not supplied, removes the default regex (-E nothing will be ignored) +=item B<--timeout> I + +Set timeout for HTTP requests. Default: 60 seconds. + =item B<-D>|B<--debug> Display debug information (additional post requests sent to the site, -- cgit v1.2.3