(status int)
| 94 | } |
| 95 | |
| 96 | func (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 | |
| 108 | func (cw *challengeWriter) Write(b []byte) (int, error) { |
| 109 | if !cw.written { |
no outgoing calls