From bfa862b80daddf3be0747de2ab1ed3272ab56277 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 26 Jan 2010 10:55:39 -0800 Subject: [PATCH] Decrease connection timeout on USPS shipping drivers. Fixes bug #11374 --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Shop/ShipDriver/USPS.pm | 1 + lib/WebGUI/Shop/ShipDriver/USPSInternational.pm | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index b4bd2ef82..6960696cd 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,6 +4,7 @@ - fixed #11371: Spaces in the names of custom profile fields - fixed #11372: All Search Forms should use GET - fixed #11373: Problem creating FilePump bundles + - fixed #11374: USPS shipping drivers take 3 minutes to timeout 7.8.10 - fixed #11332: Pagination in webgui.org forum urls diff --git a/lib/WebGUI/Shop/ShipDriver/USPS.pm b/lib/WebGUI/Shop/ShipDriver/USPS.pm index a1c0fc34a..7335c2d4a 100644 --- a/lib/WebGUI/Shop/ShipDriver/USPS.pm +++ b/lib/WebGUI/Shop/ShipDriver/USPS.pm @@ -396,6 +396,7 @@ sub _doXmlRequest { my $userAgent = LWP::UserAgent->new; $userAgent->env_proxy; $userAgent->agent('WebGUI'); + $userAgent->timeout('45'); my $url = 'http://production.shippingapis.com/ShippingAPI.dll?API=RateV3&XML='; $url .= $xml; my $request = HTTP::Request->new(GET => $url); diff --git a/lib/WebGUI/Shop/ShipDriver/USPSInternational.pm b/lib/WebGUI/Shop/ShipDriver/USPSInternational.pm index 62cf7c7b2..577bc172d 100644 --- a/lib/WebGUI/Shop/ShipDriver/USPSInternational.pm +++ b/lib/WebGUI/Shop/ShipDriver/USPSInternational.pm @@ -352,6 +352,7 @@ sub _doXmlRequest { my $userAgent = LWP::UserAgent->new; $userAgent->env_proxy; $userAgent->agent('WebGUI'); + $userAgent->timeout('45'); my $url = 'http://production.shippingapis.com/ShippingAPI.dll?API=IntlRate&XML='; $url .= $xml; my $request = HTTP::Request->new(GET => $url);