Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux LWP Useragent中的状态读取失败_Linux_Perl_Https_Operating System_Lwp Useragent - Fatal编程技术网

Linux LWP Useragent中的状态读取失败

Linux LWP Useragent中的状态读取失败,linux,perl,https,operating-system,lwp-useragent,Linux,Perl,Https,Operating System,Lwp Useragent,案例1: 我的服务器(远程访问没有internet访问)在443端口中连接到远程服务器。使用web服务URL,我需要发送web服务请求并接收响应。我可以使用发送请求,但无法从远程服务器接收响应。 代码: 下面是我的代码,我正在使用perl中的lwp代理发送和接收https请求 use Data::Dumper; use LWP::UserAgent; use HTTP::Status; use HTTP::Response; use HTTP::Request

案例1: 我的服务器(远程访问没有internet访问)在443端口中连接到远程服务器。使用web服务URL,我需要发送web服务请求并接收响应。我可以使用发送请求,但无法从远程服务器接收响应。 代码: 下面是我的代码,我正在使用perl中的lwp代理发送和接收https请求

  use Data::Dumper;
    use LWP::UserAgent;
    use HTTP::Status;
    use HTTP::Response;
    use HTTP::Request::Common;
    $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
    $LWPUserAgent = new LWP::UserAgent( 'timeout' => '20');
    $LWPUserAgent->ssl_opts('verify_hostname' => 0) ;
    $WEB_URL="https://webserviceurl.com/Request?Arg1|Arg2|Arg3|Arg4";
    $Response = $LWPUserAgent->get($WEB_URL);
    print Dumper $Response ;
我使用Data::Dumper打印了响应,并在响应下面显示

 $VAR1 = bless( {
                   '_content' => 'Status read failed:  at /usr/share/perl5/Net/HTTP/Methods.pm line 269.',
                     '_rc' => 500,
                     '_headers' => bless( {
                                            'client-warning' => 'Internal response',
                                            'client-date' => 'Tue, 13 Oct 2015 15:13:21 GMT',
                                            'content-type' => 'text/plain'
                                          }, 'HTTP::Headers' ),
                     '_msg' => 'Status read failed: ',
                     '_request' => bless( {
                                            '_content' => '',
                                            '_uri' => bless( do{\(my $o = 'https://webserviceurl.com/Request?Arg1%7Arg2%7Arg3%7Arg4')}, 'URI::https' ),
                                            '_headers' => bless( {
                                                                   'user-agent' => 'libwww-perl/6.04'
                                                                 }, 'HTTP::Headers' ),
                                            '_method' => 'GET'
                                          }, 'HTTP::Request' )
                   }, 'HTTP::Response' );
我在谷歌上搜索了更多关于这方面的信息,但我找不到任何关于这方面的想法。 我的服务器信息是: 操作系统-喘息7.2 64位。 perl 5,版本14,subversion 2(v5.14.2),为x86_64-linux-gnu-thread-multi构建 LWP::UserAgent-6.04 HTTP::Response、HTTP::Status、HTTP::Request::通用版本为-6.03。 案例2:我的服务器(家庭和互联网接入)使用我的互联网连接静态ip进行连接。使用我的代理试图用下面的代码运行上面的代码

$LWPUserAgent->proxy('https','')


请设置
$ENV{HTTPS\u DEBUG}=1并在此处写入脚本打印的内容

您有什么版本的Net::HTTP?这个错误消息甚至不存在于最新的版本中。考虑到它是perl
5.10
——已经6年了,已经过时了,我想它也不是太新的Net::HTTP版本。在两台服务器中,Net::HTTP的版本都是6.03,我可以使用LWP::UserAgent在HTTP(80端口)中发送和接收web服务请求。但在https(443端口)中,只有我面临这个问题。它仍然在打印相同的内容。我看不出有什么不同。状态读取失败:at/usr/share/perl5/Net/HTTP/Methods.pm第269行。500内部错误。
I am able to send and receive the https requests using LWP agent and working fine. 
My server information are:
OS - squeeze (6.0.6) 32 bit
perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi
LWP::UserAgent - 6.13
HTTP::Response - 5.836
HTTP::Status - 5.817
HTTP::Request::Common - 5.824

I confused of the these things.
1.OS problem
2.Package versions problem
3.whether is it a bug in wheezy 
If any one can provide me the correct direction to resolve this it would be highly appreciated.