GoのHTTPサーバーが自動でContent-TypeやDateが決めないようにする方法
#Go
#golang
以下のようにnilを入れればよい。ヘッダは正規化する。
code:go
w.Header()
textproto.CanonicalMIMEHeaderKey(header)
= nil
w http.ResponseWriter
header string
参考:
net/http: test and document suppressing implicit Content-Type respons… · golang/go@5ed44e9
net/http: allow server handlers to omit Content-Type · Issue #8992 · golang/go