For a streaming http endpoint is there a way to refrain from sending the length?
w.Header().Set("Content-Type", "image/jpeg")
w.Header().Set("Transfer-Encoding", "chunked")
w.Header().Del("Content-Length")
This is what I get back.
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: image/jpeg
Date: Mon, 23 Jun 2014 10:00:59 GMT
Transfer-Encoding: chunked
Transfer-Encoding: chunked
The server prints a warning as well.
2014/06/23 06:04:03 http: WriteHeader called with both Transfer-Encoding of "chunked" and a Content-Length of 0