You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my $furl = Furl->new( inet_aton => sub { new IO::Socket::INET( LocalAddr => $ips[rand @ips]); }, ssl_opts => { SSL_verify_mode => '0' }, timeout => '30', inactivity_timeout => '30', max_redirects => '0', headers => [ 'Accept-Encoding' => 'gzip', 'Connection' => 'close' ] );
Which resulted in error:
Thread 20 terminated abnormally: Bad arg length for Socket::pack_sockaddr_in, length is 37, should be 4 at /usr/local/share/perl5/Furl/HTTP.pm line 676.
Does anyone have a working example for setting the outbound IP address, or perhaps a patch?
The text was updated successfully, but these errors were encountered:
Hello,
I have tried using get_address, LocalAddr, and inet_aton to no avail in my attempts to set the outbound IP/local bind address. Looking over https://github.com/tokuhirom/Furl/blob/master/lib/Furl/HTTP.pm it seems as though IO::Socket can be used similar to https://github.com/tokuhirom/Furl/blob/master/lib/Furl/HTTP.pm#L1355 however I'm fairly sure I'm doing it wrong. For example, I tried doing the following:
my $furl = Furl->new(
inet_aton => sub { new IO::Socket::INET( LocalAddr => $ips[rand @ips]); },
ssl_opts => { SSL_verify_mode => '0' },
timeout => '30',
inactivity_timeout => '30',
max_redirects => '0',
headers => [ 'Accept-Encoding' => 'gzip', 'Connection' => 'close' ]
);
Which resulted in error:
Does anyone have a working example for setting the outbound IP address, or perhaps a patch?
The text was updated successfully, but these errors were encountered: