goagent/goagent — pull request #136 by wwqgtxx (2013-08-07 00:02:19+00:00)
Title: HEAD方法Content-Length值永远为0

Reported by james.fa...@gmail.com, Yesterday (18 hours ago)

data = dataio.getvalue()
if 0 != len(data): # <--------　判断
response_headers['Content-Length'] = str(len(data))
response_headers_data = zlib.compress('\n'.join('%s:%s' % (k.title(), v) for k, v in response_headers.items() if not k.startswith('x-google-')))[2:-4]
start_response('200 OK', [('Content-Type', 'image/gif')])

wsgi.py中，因为head方法的data为空，故正常的Content-Length值被覆盖。
加入0 != len(data) 判断可解决此问题。