]> git.evergreen-ils.org Git - Evergreen.git/commit
TPAC: Avoid 500 errs on record page due to ipv6 ignorance
authorDan Scott <dscott@laurentian.ca>
Thu, 11 Oct 2012 02:06:32 +0000 (22:06 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 11 Oct 2012 13:55:54 +0000 (09:55 -0400)
commit49c9f1214f2663b2a6b12af0ce20a279d095be20
treeef934768b26ee7c9a5b0e71a0033eda799dc2e35
parent9e6ab63c189c3ac177f8422b532c76270f20cafd
TPAC: Avoid 500 errs on record page due to ipv6 ignorance

Net::HTTP does not handle ipv6 addresses properly, and is subject to
failing to return a request object if handed one (some systems seem to
prefer ipv6). This commit checks the value of the request object before
invoking any methods on it, and also short-circuits the AC lookup loop
if the host could not be resolved to avoid flooding the logs with
multiple "Unable to connect..." warnings.

If Net::HTTP grows ipv6 support, this commit can still stay in place and
the lookups will just start magically working.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm