summary refs log tree commit diff
path: root/lib/Net
diff options
context:
space:
mode:
authorGavin Carr <gavin@openfusion.com.au>2010-09-02 19:36:51 +0100
committerGavin Carr <gavin@openfusion.com.au>2010-09-02 19:36:51 +0100
commit56bafa3cb462b95feacc82d1fd4f16c7984ff3a2 (patch)
tree89a72be4d9271baa90c91204152aa1a2ced236d8 /lib/Net
parenttweak Bucket::set_properties error to include status line (diff)
downloadnet-riak-56bafa3cb462b95feacc82d1fd4f16c7984ff3a2.tar.gz
increase LWP MaxLineLength to allow long riak Link http headers
Diffstat (limited to 'lib/Net')
-rw-r--r--lib/Net/Riak/Role/UserAgent.pm7
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;