push推送相关注意事项

41 篇文章 0 订阅
13 篇文章 0 订阅

1.curl的问题
配置https的证书http://blog.csdn.net/weixin_35884835/article/details/52588157

2.ios push 针对http1.0的,需要服务器开通2195这个端口

3.nodejs报下面的错误 是证书过期了

 2017-02-15 08:07:03 16621>>>>>>> Socket undefined error occurred:Error: socket hang up
2017-02-15 08:07:03 16621<<<<<<< TypeError: Cannot read property 'length' of undefined

4.抓包

tcpdump tcp port 443 -i any -Xs 1024 -nn
tcpdump tcp port 80 -i any -As 0 -nn
netstat -nap  判断哪个端口被调用

5.华为的push是要像华为申请一个access_token的 然后更改证书的的时候需要同步删除之前保存的access_token

{"message":"No permission to send message to these tmIDs.","requestID":"14900642050202330435","resultcode":20203}

出现这个错误是device token错误的原因导致的
可能是调试期间 access_token没有随着证书的变化而变化

6.忽略https的证书 加上 -k这个参数,下面这个报错就是需要证书验证,可以忽略

[root@localhost ~]# curl https://ip/index.php
curl: (60) Peer's Certificate has expired.
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

curl命令忽略

curl https://ip -k

yii2 处理忽略https证书

$response = $curl->reset()->setOption(
    CURLOPT_POSTFIELDS,
    http_build_query($data_array)
)->setOption(CURLOPT_SSL_VERIFYPEER, false)->post($url);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值