curl - cURL: block 编码数据中的[P] roblem(2)

标签 curl guzzle php-curl

我有一个使用Guzzle发出HTTP请求的PHP应用程序。

我收到以下异常:

[curl] 56: Problem (2) in the Chunked-Encoded data [url] http://...


看起来问题出在cURL。我试图从源代码中编译最新版本的cURL,但似乎无济于事。

可能是什么问题,我该如何解决?



$ curl --version
curl 7.41.0 (i686-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

$ cat /etc/issue
Ubuntu 14.04.2 LTS \n \l

$ composer show -i

guzzle/guzzle                       v3.9.2             Guzzle is a PHP HTTP client library and framework for building RESTful web service clients
misd/guzzle-bundle                  v1.1.5             Integrates Guzzle into your Symfony2 application

$ apt-cache policy php5-curl

php5-curl:
  Installed: 5.5.9+dfsg-1ubuntu4.6
  Candidate: 5.5.9+dfsg-1ubuntu4.6

最佳答案

相同的问题,通过将curl升级到7.36得以解决(由于某些原因,apt-get安装自2015年8月14日起未更新)

$ sudo add-apt-repository ppa:costamagnagianfranco/ettercap-stable-backports
$ sudo apt-get update
$ sudo apt-get install curl

关于curl - cURL: block 编码数据中的[P] roblem(2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29146515/

相关文章:

python-3.x - python 3.5+ 中 pycurl 的异步替代方案

python - 使用多个并行线程分部分下载大文件

iphone - 如何格式化 POST 以使用基本 HTTP 身份验证和 Devise Rails Gem 创建用户

PHP GuzzleHttp。如何使用参数发出 post 请求?

php - 带有 [] 的 Guzzle 参数无法识别为数组

php curl header 不从网站返回?

php - 对于同一服务器,CURLOPT_CONNECTTIMEOUT 和 CURLOPT_TIMEOUT 具有良好的生产值

php - 使用 Guzzle 6 创建异步 json 请求池以发送到 API 端点的正确方法是什么?

google-drive-api - 如何从 Google Drive REST api v3 获取共享链接?

PHP cURL 缺少一些响应 cookie