原文地址:http://dade.io/archives/25/php
作網盤,上傳文件到服務器時(服務器使用squid作代理),遇到下面的錯誤提示:服務器
百思不得其解,查看PHP文檔時,筆記中發現以下說明:curl
Sending a post file upload across a squid proxy, the request was rejected by the proxy. In the error page returned it provided among other possible causes:"Expect:" feature is being asked from a HTTP/one.zero.
Solution: Add the option <?php curl_setopt($cl,CURLOPT_HTTPHEADER,array("Expect:")); ?>. This will remove the expect http header.
按照方案去掉「Expect:」的header頭,OK!ide
文檔仍是挺有用的,但願能幫到各位!post