Status message

The page you requested does not exist. A search for how to circumvent 417 expectation failed behind a squid proxy resulted in this page.

How to circumvent the 417 Expectation failed behind a Squid proxy

Category:

Many applications rely on using a special HTTP/1.1 header (Expect: 100-continue) when doing a POST, which is not happily supported by Squid.

RFC2616 says:

The purpose of the 100 (Continue) status (see section 10.1.1) is to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body. In some cases, it might either be inappropriate or highly inefficient for the client to send the body if the server will reject the message without looking at the body.

We can configure Squid to simply ignore that request header, and usually client with poor error handling will fallback without even notice it.

Add in squid.conf:
ignore_expect_100 on

Android application like AppBrain and Facebook Contact Sync, and BOINC client was having login issues due to this reason.

Comments

TJ's picture

Thanks for the info. I was getting 417 error when trying to access Amazon Web Services (AWS) from behind a squid proxy, and was getting frustrated about not being able to solve it. Added the line in the conf file and everything is working fine now.

Cheers.

Jernej's picture

Hi!
I had the same issue with squid reverse proxy, where I have multiple webservers behind single IP. I use squid to redirect requests to appropriate webserver, but there was a problem with apps that wanted to upload files. "ignore_expect_100 on" solved the problem. Many thanks for your post!
Jernej

Yaron's picture

Thanks, this has frustrated me for hours. Problem is, this is a workaround and my PHP-based app is supposed to work without changing the proxy...

Mike's picture

I found this after an automated FTP program broke when upgrading Squid.

Thanks a bunch!

gionn's picture

That's really interesting since expectation is an HTTP feature :P

Add new comment

Via Twitter

  • Fing - Network scanner for Android https://t.co/ukIdHHqK 1 day 6 hours ago
  • @manuelmazzuola io stavo per provare redis, ma ho un sonno che schianto e vo a letto :P lunedì si prova 1 day 22 hours ago
  • Symfony CMF as a CMS replacement for developers #phpday http://t.co/RsUTvcR3 2 days 3 hours ago
  • @rosamammoli tutti entusiasti, è un peccato fermarsi qui solo per oggi #phpday 2 days 4 hours ago
  • The room is full on track 3 for continuous deployment security on http://t.co/MOAyi4U9 #phpday 2 days 5 hours ago

Blog written by Giovanni Toraldo and licensed under CC-BY-SA

This blog is anonymously available via:
tor and tor2web.

Powered by Drupal
ipv6 test
WORLD IPV6 LAUNCH is 6 June 2012 – The Future is Forever