If I run that program it just hangs there forever, waiting for an HTTP request.
I suppose there was a repro step you forgot to include, probably involving an HTTP request. I'll speculate that your request involved a POST with a chunked body, which your origin server can't handle:
Trying 66.228.56.168...
Escape character is '^]'.
POST / HTTP/1.1
Transfer-Encoding: chunked
HTTP/1.1 411 Length Required
Server: nginx/1.0.0
Date: Wed, 10 Aug 2011 17:27:20 GMT
Content-Type: text/html
Content-Length: 180
Connection: close
.... so the bug is your server's and/or the request you're sending.
nginx or whatever is behind it claims to be HTTP/1.1 but can't handle chunking as HTTP/1.1 requires.
You'll need to include the Content-Length, but Go isn't going to pre-emptively guess that your server is non-compliant and buffer an unknown amount of data into memory just to count it and send a Content-Length header. Go's just following the specs and forwarding along the request.
- Brad