android GCM服务错误500
在试图通过GCM将我的邮件从我的服务器以http方式发送到android手机时 获取以下错误:android GCM服务错误500,android,google-cloud-messaging,Android,Google Cloud Messaging,在试图通过GCM将我的邮件从我的服务器以http方式发送到android手机时 获取以下错误: {"collapse_key":"update","registration_ids":["the reg I got from the phone"],"delay_while_idle":true,"data":{"info":"data_changed"}}, response is: $VAR1 = bless( { '_content' => 'Can
{"collapse_key":"update","registration_ids":["the reg I got from the phone"],"delay_while_idle":true,"data":{"info":"data_changed"}}, response is: $VAR1 = bless( {
'_content' => 'Can\'t connect to android.googleapis.com:443 (Network is unreachable)
LWP::Protocol::https::Socket: connect: Network is unreachable at /usr/local/share/perl5/LWP/Protocol/http.pm line 51.
',
'_rc' => 500,
'_headers' => bless( {
'client-warning' => 'Internal response',
'client-date' => 'Sun, 22 Sep 2013 18:23:10 GMT',
'content-type' => 'text/plain',
'::std_case' => {
'client-warning' => 'Client-Warning',
'client-date' => 'Client-Date'
}
}, 'HTTP::Headers' ),
'_msg' => 'Can\'t connect to android.googleapis.com:443 (Network is unreachable)',
'_request' => bless( {
'_content' => '{"collapse_key":"update","registration_ids":["the reg I got from the phone"],"delay_while_idle":true,"data":{"info":"data_changed"}}',
'_uri' => bless( do{\(my $o = 'https://android.googleapis.com/gcm/send')}, 'URI::https' ),
'_headers' => bless( {
'user-agent' => 'libwww-perl/6.05',
'content-type' => 'application/json; charset=UTF-8',
'content-length' => 266,
'authorization' => 'key=my api key'
}, 'HTTP::Headers' ),
'_method' => 'POST'
}, 'HTTP::Request' )
}, 'HTTP::Response' );
我一直在尝试不同的事情,但都没能成功
我在服务器端使用perl,但这不会影响这个问题,因为这是一个简单的HTTPPOST请求,似乎不起作用
有人知道为什么会发生这种情况吗?我想我会更新这个问题,这样它就不会没有答案了 问题是我忘记为用户代理定义“ssl\u opts”参数 这意味着https验证没有正确完成 现在工作正常:)