MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / WriteHeader

Method WriteHeader

internal/httpapi/middleware.go:96–106  ·  view source on GitHub ↗
(status int)

Source from the content-addressed store, hash-verified

94}
95
96func (cw *challengeWriter) WriteHeader(status int) {
97 if !cw.written {
98 cw.written = true
99 if status == http.StatusUnauthorized {
100 if c := cw.build(cw.r); c != "" {
101 cw.ResponseWriter.Header().Set("WWW-Authenticate", c)
102 }
103 }
104 }
105 cw.ResponseWriter.WriteHeader(status)
106}
107
108func (cw *challengeWriter) Write(b []byte) (int, error) {
109 if !cw.written {

Callers 15

WriteMethod · 0.95
testServerFunction · 0.45
labelDepsFunction · 0.45
writeRawErrorFunction · 0.45
attTestServerFunction · 0.45
protectionServerFunction · 0.45
scopeTestServerFunction · 0.45
HandlerFunction · 0.45
WriteLimitErrorFunction · 0.45
SubscriberReceiverFunction · 0.45

Calls

no outgoing calls

Tested by 15

testServerFunction · 0.36
labelDepsFunction · 0.36
attTestServerFunction · 0.36
protectionServerFunction · 0.36
scopeTestServerFunction · 0.36
handleMethod · 0.36