The problem is also reproducible with wget, which allows me to show the results both with and without the squid proxy.
Here's the failure, going through the proxy:
wooledg@wooledg:~$ wget -O /dev/null --debug http://dwarffortresswiki.org/
DEBUG output created by Wget 1.13.4 on linux-gnu.
URI encoding = `UTF-8'
URI encoding = `UTF-8'
--2013-04-18 09:45:34-- http://dwarffortresswiki.org/
Resolving imadev.eeg.ccf.org (imadev.eeg.ccf.org)... 10.76.173.78
Caching imadev.eeg.ccf.org => 10.76.173.78
Connecting to imadev.eeg.ccf.org (imadev.eeg.ccf.org)|10.76.173.78|:3128... connected.
Created socket 5.
Releasing 0x0000000000bbe790 (new refcount 1).
---request begin---
GET http://dwarffortresswiki.org/ HTTP/1.1
User-Agent: Wget/1.13.4 (linux-gnu)
Accept: */*
Host: dwarffortresswiki.org
Connection: Close
Proxy-Connection: Keep-Alive
---request end---
Proxy request sent, awaiting response...
---response begin---
HTTP/1.0 500 Internal Server Error
Server: cloudflare-nginx
Date: Thu, 18 Apr 2013 13:43:35 GMT
Content-Type: text/html; charset=utf-8
X-Content-Type-Options: nosniff
Vary: Accept-Encoding
CF-RAY: 611c8ed7ecd0167
Age: 119
Content-Length: 1005
X-Cache: HIT from imadev
Via: 1.0 ccwsa2.cc.ad.cchs.net:80 (Cisco-IronPort-WSA/7.5.0-833), 1.0 imadev:3128 (squid/2.7.STABLE9)
Connection: close
---response end---
500 Internal Server Error
URI content encoding = `utf-8'
Closed fd 5
2013-04-18 09:45:34 ERROR 500: Internal Server Error.
And here's the successful case, bypassing the squid proxy (but I cannot bypass the transparent proxy):
wooledg@wooledg:~$ (unset http_proxy; wget -O /dev/null --debug http://dwarffortresswiki.org/)
DEBUG output created by Wget 1.13.4 on linux-gnu.
URI encoding = `UTF-8'
--2013-04-18 09:47:47-- http://dwarffortresswiki.org/
Resolving dwarffortresswiki.org (dwarffortresswiki.org)... 108.162.198.207, 108.162.199.207, 2400:cb00:2048:1::6ca2:c6cf, ...
Caching dwarffortresswiki.org => 108.162.198.207 108.162.199.207 2400:cb00:2048:1::6ca2:c6cf 2400:cb00:2048:1::6ca2:c7cf
Connecting to dwarffortresswiki.org (dwarffortresswiki.org)|108.162.198.207|:80... connected.
Created socket 5.
Releasing 0x0000000001f54740 (new refcount 1).
---request begin---
GET / HTTP/1.1
User-Agent: Wget/1.13.4 (linux-gnu)
Accept: */*
Host: dwarffortresswiki.org
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 200 OK
Server: cloudflare-nginx
Date: Thu, 18 Apr 2013 13:47:47 GMT
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Vary: Accept-Encoding, Cookie
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: private, must-revalidate, max-age=0
Content-Language: en
Set-Cookie: __cfduid=d8807080c93f894133e2fe08c4c2f26241366292867; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.dwarffortresswiki.org
CF-RAY: 611cf186b370166
Transfer-Encoding: chunked
Last-Modified: Wed, 17 Apr 2013 20:46:32 UTC
Via: 1.1 ccwsa1.cc.ad.cchs.net:80 (Cisco-IronPort-WSA/7.5.0-833)
Connection: keep-alive
---response end---
200 OK
cdm: 1 2
Stored cookie dwarffortresswiki.org -1 (ANY) / <permanent> <insecure> [expiry 2019-12-23 18:50:00] __cfduid d8807080c93f894133e2fe08c4c2f26241366292867
Registered socket 5 for persistent reuse.
URI content encoding = `UTF-8'
Length: unspecified [text/html]
Saving to: `/dev/null'
[ <=> ] 42,706 --.-K/s in 0.01s
Last-modified header invalid -- time-stamp ignored.
2013-04-18 09:47:48 (3.43 MB/s) - `/dev/null' saved [42706]