Hello, For some sites (like bits.wikimedia.org, kernel.org or google.ru, list will depend on your DNS server and its settings), polipo returns Error 504 Timeout while site itself is running and accessible via any browser without a proxy. After some investigation it was found, that when polipo receives DNS answer telling that AAAA record does not exist before receiving answer for A record with CNAMEs, it results in timeout. Excatly the same problem and solution to it is available on Debian bugzilla: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540912
Created attachment 291773 [details] emerge --info
Created attachment 291775 [details, diff] polipo-1.0.4.1-dns.patch Patch from Debian bug #540912 by Stepan Golosunov fixes this problem for me.
+ 02 May 2013; Tom Wijsman <TomWij@gentoo.org> + +files/polipo-1.0.4.1-dns-timeout-fix.patch, +polipo-1.0.4.1-r2.ebuild: + EAPI 5. Fix incorrect timeout reporting for domains that are available, + revision bump. Thanks to Andrew Savchenko for reporting. Fixes bug #389675.