From f0572477da5b57f64dbf16d03578d853ffe932a7 Mon Sep 17 00:00:00 2001
From: Dan Scott <dscott@laurentian.ca>
Date: Sun, 13 May 2018 10:59:24 -0400
Subject: [PATCH] LP#1666987: Include a user-agent to build the relator map

loc.gov started using Cloudflare protection to block HTTP access from default
user agents, so identify ourselves as an Evergreen user agent to restore our
access.

Long term we should evolve to using the linked open data access method
via id.loc.gov but let's get this working first.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
---
 build/tools/relator_map | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/build/tools/relator_map b/build/tools/relator_map
index 742348248f..dc949b1e33 100755
--- a/build/tools/relator_map
+++ b/build/tools/relator_map
@@ -4,9 +4,12 @@ use warnings;
 
 use XML::LibXML;
 use XML::LibXML::Reader;
-use LWP::Simple;
+use LWP::Simple qw($ua get);
 use Data::Dumper;
 
+# loc.gov blocks basic user agents now
+$ua->agent('Evergreen/3.1');
+
 my %relator;
 my $code = 0;
 my $fullname = 0;
-- 
2.11.0