[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 859d1db13fc49b46bf1707d8fa429818fd9c97a9
Mark Wells
mark at 420.am
Tue Oct 15 13:08:28 PDT 2013
The branch, FREESIDE_2_3_BRANCH has been updated
via 859d1db13fc49b46bf1707d8fa429818fd9c97a9 (commit)
from a8a70873f47d54c50b4ccb74c56aba9ee8efc208 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 859d1db13fc49b46bf1707d8fa429818fd9c97a9
Author: Mark Wells <mark at freeside.biz>
Date: Tue Oct 15 13:08:12 2013 -0700
compatibility fix for FFIEC census tract lookup, #25258
diff --git a/FS/FS/Misc/Geo.pm b/FS/FS/Misc/Geo.pm
index 42bf798..e5355cc 100644
--- a/FS/FS/Misc/Geo.pm
+++ b/FS/FS/Misc/Geo.pm
@@ -6,6 +6,7 @@ use vars qw( $DEBUG @EXPORT_OK );
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common qw( GET POST );
+use HTTP::Cookies;
use HTML::TokeParser;
use URI::Escape 3.31;
use Data::Dumper;
@@ -41,13 +42,13 @@ sub get_censustract {
my $return = {};
my $error = '';
- my $ua = new LWP::UserAgent;
+ my $ua = new LWP::UserAgent('cookie_jar' => HTTP::Cookies->new);
my $res = $ua->request( GET( $url ) );
warn $res->as_string
if $DEBUG > 1;
- unless ($res->code eq '200') {
+ if (!$res->is_success) {
$error = $res->message;
@@ -67,7 +68,7 @@ sub get_censustract {
last if $viewstate && $eventvalidation;
}
- unless ($viewstate && $eventvalidation ) {
+ if (!$viewstate or !$eventvalidation ) {
$error = "either no __VIEWSTATE or __EVENTVALIDATION found";
@@ -79,6 +80,7 @@ sub get_censustract {
my @ffiec_args = (
__VIEWSTATE => $viewstate,
__EVENTVALIDATION => $eventvalidation,
+ __VIEWSTATEENCRYPTED => '',
ddlbYear => $year,
txtAddress => $location->{address1},
txtCity => $location->{city},
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Misc/Geo.pm | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list