Skip to content
Advertisement

cURL empty request data if https connection

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

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement