cURL Simple File Upload - 417 Expectation Failed

前端 未结 3 1485
伪装坚强ぢ
伪装坚强ぢ 2020-12-17 15:39

I have a problem with a simple file upload post with cURL... I did it so many times but in this case I always get \"417 Expectation Failed\" from server. When I try to post

相关标签:
3条回答
  • 2020-12-17 16:10

    Can also be fixed using set opt header setting:

    curl_setopt($curl,CURLOPT_HTTPHEADER,array("Expect:  "));
    

    http://www.khattam.info/417-expectation-failed-in-php-curl-while-submitting-multi-part-forms-2011-04-14.html

    0 讨论(0)
  • 2020-12-17 16:25

    This happens when you are behind a proxy which is running in HTTP 1.1 mode where as the client is running in HTTP 1.0. In curl command line you can add --http1.0 in the arguments to solve the issue

    0 讨论(0)
  • 2020-12-17 16:32

    add this to your lighttpd config: server.reject-expect-100-with-417 = "disable"

    restart lighttpd. cheers :)

    0 讨论(0)
提交回复
热议问题