PDT 在成功前返回 423 作为第一行? [英] PDT returning 423 as first line before success?

查看:41
本文介绍了PDT 在成功前返回 423 作为第一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 PDT 在沙箱中工作,并且刚刚遇到了使用 HTTP 1.1 的问题,如下所述:

https://stackoverflow.com/a/14701946/391615

已经改变了一切,当我创建与

的连接时

$fp = fsockopen('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);fputs ($fp, $header . $req);//读取body数据$res = '';而 (!feof($fp)){$line = fgets ($fp, 1024);//等等...

我发现第一行返回看起来像这样:

<前>423成功mc_gross=240.00发票=PP0000protection_eligibility=部分+合格+-+INR+仅地址状态=未确认

知道 423 是什么吗?

解决方案

我们开始吧:PHP fsockopen()/fread() 返回混乱的数据>

看起来像是从服务器返回的分块数据

I'm trying to get PDT working in the sandbox, and have just run afoul of the problem of using HTTP 1.1 as described here:

https://stackoverflow.com/a/14701946/391615

Having changed everything, when I create my connection to

$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
fputs ($fp, $header . $req);

// read the body data 
$res = '';
while (!feof($fp)) 
{
    $line = fgets ($fp, 1024);
    // etc...

I find that the very first lines return look like this:

423
SUCCESS
mc_gross=240.00
invoice=PP0000
protection_eligibility=Partially+Eligible+-+INR+Only
address_status=unconfirmed

Any idea what the 423 is all about?

解决方案

Well here we go: PHP fsockopen() / fread() returns messed up data

Looks like it's chunked data being returned from the server

这篇关于PDT 在成功前返回 423 作为第一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆