dqwp81696 2016-10-23 22:41
浏览 104
已采纳

如果https连接,则cURL空请求数据

I try to send the file via POST. Before that i used http connection and everything worked. But now var_dump($_REQUEST); in my php-file returns an empty array.

This my curl log:

$ curl -X POST -F "id=1" -F "file=@/tmp/file.txt" https://MY_DOMAIN/save_file.php -v

  • Hostname was NOT found in DNS cache
  • Trying MY_IP...
  • Connected to MY_DOMAIN (MY_IP) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server key exchange (12):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
  • Server certificate:
  • subject: C=RU; OU=Domain Control Validated; CN=MY_DOMAIN
  • start date: 2015-12-30 14:29:37 GMT
  • expire date: 2016-12-30 14:29:37 GMT
  • subjectAltName: MY_DOMAIN matched
  • issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Domain Validation CA - SHA256 - G2
  • SSL certificate verify ok.

    POST /save_file.php HTTP/1.1 User-Agent: curl/7.38.0 Host: MY_DOMAIN Accept: / Content-Length: 95611662 Expect: 100-continue Content-Type: multipart/form-data; boundary=------------------------4cf633b06b612b7d < HTTP/1.1 100 Continue < HTTP/1.1 200 OK

  • Server nginx/1.10.1 is not blacklisted < Server: nginx/1.10.1 < Date: Sun, 23 Oct 2016 22:22:53 GMT < Content-Type: text/html; charset=utf-8 < Transfer-Encoding: chunked < Connection: keep-alive < Set-Cookie: mwc=f25mv8leksepc8qg1t7de0rdk5; path=/ < Expires: Thu, 19 Nov 1981 08:52:00 GMT < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Pragma: no-cache < Strict-Transport-Security: max-age=31536000; < array(0) { }
  • Connection #0 to host MY_DOMAIN left intact
  • 写回答

1条回答 默认 最新

  • dongyan6910 2016-10-23 23:55
    关注

    The problem was in an unexpected place: the file size exceeds the allowable load

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?