This fails:

$ curl --trace multipart-fail.log -F "source={}"

With a squid status 417 error, ERR_INVALID_REQ.

I've never had this in practice through a web browser, so it's probably curl usage instead of squid, but if I tell curl not to use the squid proxy, the web application on the other end accepts it just fine.

(If there's a more appropriate StackExchange site for this, please let me know.)

  • Should probably go on ServerFault.
    – Josh K
    Jan 29, 2010 at 20:43

4 Answers 4


Squid doesn't support Expect: 100-continue, being a HTTP/1.0 device. Notice the response status code 417 Expectation failed.

Curl should retry the request automatically, but it doesn't; instead, you need to suppress the Expect header; e.g.,

curl -H "Expect:" --trace multipart-fail.log -F "source={}"

Alternatively you can configure Squid to simply ignore that request header...

Add in squid.conf: ignore_expect_100 on



For anyone who stumbles across this question and is getting the same problem with cURL in PHP (not the command line), try adding this line:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

It worked for me.


After a long time I fixed this issue in the following manner..

//proxy server address
//Proxy server port

     curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
     curl_setopt($ch, CURLOPT_PROXY, "$proxyServer:$proxyPort");

Reff: http://djzone.im/2010/05/php-curl-ntlm-squid-proxy-authentication/

Hope this helps someone...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .