MCPcopy Create free account
hub / github.com/devfeel/dotweb / WriteHeader

Method WriteHeader

response.go:148–153  ·  view source on GitHub ↗

WriteHeader sends an HTTP response header with the provided status code.

(code int)

Source from the content-addressed store, hash-verified

146// WriteHeader sends an HTTP response header with the provided
147// status code.
148func (w *gzipResponseWriter) WriteHeader(code int) {
149 if code == http.StatusNoContent { // Issue #489
150 w.ResponseWriter.Header().Del(HeaderContentEncoding)
151 }
152 w.ResponseWriter.WriteHeader(code)
153}
154
155// Write do write data
156func (w *gzipResponseWriter) Write(b []byte) (int, error) {

Callers

nothing calls this directly

Calls 3

DelMethod · 0.80
HeaderMethod · 0.45
WriteHeaderMethod · 0.45

Tested by

no test coverage detected