diff options
author | Gavin Carr <gavin@openfusion.com.au> | 2010-09-02 19:36:51 +0100 |
---|---|---|
committer | Gavin Carr <gavin@openfusion.com.au> | 2010-09-02 19:36:51 +0100 |
commit | 56bafa3cb462b95feacc82d1fd4f16c7984ff3a2 (patch) | |
tree | 89a72be4d9271baa90c91204152aa1a2ced236d8 /lib/Net/Riak/Role | |
parent | tweak Bucket::set_properties error to include status line (diff) | |
download | net-riak-56bafa3cb462b95feacc82d1fd4f16c7984ff3a2.tar.gz |
increase LWP MaxLineLength to allow long riak Link http headers
Diffstat (limited to '')
-rw-r--r-- | lib/Net/Riak/Role/UserAgent.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Net/Riak/Role/UserAgent.pm b/lib/Net/Riak/Role/UserAgent.pm index 4c6cb1f..ecc412f 100644 --- a/lib/Net/Riak/Role/UserAgent.pm +++ b/lib/Net/Riak/Role/UserAgent.pm @@ -11,6 +11,13 @@ has useragent => ( lazy => 1, default => sub { my $self = shift; + + # The Links header Riak returns (esp. for buckets) can get really long, + # so here increase the MaxLineLength LWP will accept (default = 8192) + my %opts = @LWP::Protocol::http::EXTRA_SOCK_OPTS; + $opts{MaxLineLength} = 65_536; + @LWP::Protocol::http::EXTRA_SOCK_OPTS = %opts; + my $ua = LWP::UserAgent->new; $ua->timeout(3); $ua; |