Subject: | "uninitialized value" error when using a proxy |
Getting an uninitialized error when using a web proxy. Script:
#!/usr/bin/perl -w
use strict;
use MIME::Base64;
use Net::SSLeay qw(get_https post_https sslcat make_headers make_form);
my ($page, $result, %headers);
Net::SSLeay::set_proxy('10.0.0.131', 8080);
$Net::SSLeay::trace = 3;
($page) = get_https('www.archlinux.org', 443, '/'); # 1
exit;
And the output:
do_httpx3(GET,1,www.archlinux.org:443) at blib/lib/Net/SSLeay.pm
(autosplit into blib/lib/auto/Net/SSLeay/do_httpx3.al) line 2210.
httpx_cat: usessl=1 (www.archlinux.org:443) at blib/lib/Net/SSLeay.pm
(autosplit into blib/lib/auto/Net/SSLeay/httpx_cat.al) line 2127.
Connect via proxy: 10.0.0.131:8080 at blib/lib/Net/SSLeay.pm (autosplit
into blib/lib/auto/Net/SSLeay/open_proxy_tcp_connection.al) line 1559.
Opening connection to 10.0.0.131:8080 (10.0.0.131) at
blib/lib/Net/SSLeay.pm (autosplit into
blib/lib/auto/Net/SSLeay/open_tcp_connection.al) line 1534.
Asking proxy to connect to www.archlinux.org:443 at
blib/lib/Net/SSLeay.pm (autosplit into
blib/lib/auto/Net/SSLeay/open_proxy_tcp_connection.al) line 1563.
Use of uninitialized value in concatenation (.) or string at
blib/lib/Net/SSLeay.pm (autosplit into
blib/lib/auto/Net/SSLeay/open_proxy_tcp_connection.al) line 1566.
write_all VM at entry=vm_unknown to_write=42
written so far 42:42 bytes (VM=vm_unknown)
got 1:0 bytes (VM=vm_unknown).
got 1:1 bytes (VM=vm_unknown).
got 1:2 bytes (VM=vm_unknown).
got 1:3 bytes (VM=vm_unknown).
got 1:4 bytes (VM=vm_unknown).
got 1:5 bytes (VM=vm_unknown).
got 1:6 bytes (VM=vm_unknown).
got 1:7 bytes (VM=vm_unknown).
got 1:8 bytes (VM=vm_unknown).
got 1:9 bytes (VM=vm_unknown).
got 1:10 bytes (VM=vm_unknown).
got 1:11 bytes (VM=vm_unknown).
got 1:12 bytes (VM=vm_unknown).
got 1:13 bytes (VM=vm_unknown).
got 1:14 bytes (VM=vm_unknown).
got 1:15 bytes (VM=vm_unknown).
got 1:16 bytes (VM=vm_unknown).
got 1:17 bytes (VM=vm_unknown).
got 1:18 bytes (VM=vm_unknown).
got 1:19 bytes (VM=vm_unknown).
got 1:20 bytes (VM=vm_unknown).
got 1:21 bytes (VM=vm_unknown).
got 1:22 bytes (VM=vm_unknown).
got 1:23 bytes (VM=vm_unknown).
got 1:24 bytes (VM=vm_unknown).
got 1:25 bytes (VM=vm_unknown).
got 1:26 bytes (VM=vm_unknown).
got 1:27 bytes (VM=vm_unknown).
got 1:28 bytes (VM=vm_unknown).
got 1:29 bytes (VM=vm_unknown).
got 1:30 bytes (VM=vm_unknown).
got 1:31 bytes (VM=vm_unknown).
got 1:32 bytes (VM=vm_unknown).
got 1:33 bytes (VM=vm_unknown).
got 1:34 bytes (VM=vm_unknown).
got 1:35 bytes (VM=vm_unknown).
got 1:36 bytes (VM=vm_unknown).
Proxy response: HTTP/1.0 200 Connection established
Creating SSL 0 context...
Creating SSL connection (context was '136737624')...
Setting fd (ctx 136737624, con 136739768)...
Entering SSL negotiation phase...
Cipher list: DHE-RSA-AES256-SHA, DHE-RSA-AES256-SHA, DHE-DSS-AES256-SHA,
AES256-SHA, EDH-RSA-DES-CBC3-SHA, EDH-DSS-DES-CBC3-SHA, DES-CBC3-SHA,
DES-CBC3-MD5, DHE-RSA-AES128-SHA, DHE-DSS-AES128-SHA, AES128-SHA,
IDEA-CBC-SHA, IDEA-CBC-MD5, RC2-CBC-MD5, DHE-DSS-RC4-SHA, RC4-SHA,
RC4-MD5, RC4-MD5, RC4-64-MD5, EXP1024-DHE-DSS-DES-CBC-SHA,
EXP1024-DES-CBC-SHA, EXP1024-RC2-CBC-MD5, EDH-RSA-DES-CBC-SHA,
EDH-DSS-DES-CBC-SHA, DES-CBC-SHA, DES-CBC-MD5, EXP1024-DHE-DSS-RC4-SHA,
EXP1024-RC4-SHA, EXP1024-RC4-MD5, EXP-EDH-RSA-DES-CBC-SHA,
EXP-EDH-DSS-DES-CBC-SHA, EXP-DES-CBC-SHA, EXP-RC2-CBC-MD5,
EXP-RC2-CBC-MD5, EXP-RC4-MD5, EXP-RC4-MD5\n at blib/lib/Net/SSLeay.pm
(autosplit into blib/lib/auto/Net/SSLeay/https_cat.al) line 2060.
SSL_connect 5698: 1 - error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol
Use of uninitialized value in split at blib/lib/Net/SSLeay.pm (autosplit
into blib/lib/auto/Net/SSLeay/do_httpx2.al) line 2231.
The uninitialized variable appears to be proxyauth. It doesn't get set
in set_proxy if there is no user given.
I'm running archlinux 0.7.1 and the version of perl is v5.8.8 and is
multithreaded.
Thanks.