tracker/frontend/http
elotreum 5082146ae9 http: explicitly set Content-Type header
Since Content-Type is not explicitly set, golang sniffs the responses
and attempts a guess. With announce responses, this usually means it
guesses application/octet-stream.

According to the godoc at
https://golang.org/pkg/net/http/#ResponseWriter

// If WriteHeader has not yet been called, Write calls
// WriteHeader(http.StatusOK) before writing the data. If the Header
// does not contain a Content-Type line, Write adds a Content-Type set
// to the result of passing the initial 512 bytes of written data to
// DetectContentType. Additionally, if the total size of all written
// data is under a few KB and there are no Flush calls, the
// Content-Length header is added automatically.
2020-01-14 13:31:25 -07:00
..
bencode *: add subtests for all table driven tests 2017-12-29 17:44:45 -05:00
frontend.go http: explicitly set Content-Type header 2020-01-14 13:31:25 -07:00
parser.go config: update example config 2019-10-17 12:38:08 +09:00
prometheus.go frontend: isolate prometheus logic to one file 2018-06-15 13:33:26 -04:00
writer.go pkg/log: create wrapper around logrus 2017-06-26 20:46:40 +02:00
writer_test.go *: add subtests for all table driven tests 2017-12-29 17:44:45 -05:00