Remove country_name header which is redundant

This commit is contained in:
Jared Johnson 2014-11-07 16:39:28 -06:00
parent 0f0495f09e
commit 943b1fcaf3

View File

@ -202,9 +202,8 @@ sub load_geoip2 {
sub add_headers { sub add_headers {
my ( $self, $txn ) = @_; my ( $self, $txn ) = @_;
for my $h (qw( Country Country-Name Continent City ASN )) { for my $h (qw( Country Continent City ASN )) {
my $note = lc "geoip_$h"; my $note = lc "geoip_$h";
$h =~ s/-/_/;
next if ! $self->connection->notes($note); next if ! $self->connection->notes($note);
$txn->header->delete("X-GeoIP-$h"); $txn->header->delete("X-GeoIP-$h");
$txn->header->add( "X-GeoIP-$h", $self->connection->notes($note), 0 ); $txn->header->add( "X-GeoIP-$h", $self->connection->notes($note), 0 );