DoHTTP 处理HTTP请求
(req *http.Request, resp http.ResponseWriter)
| 45 | |
| 46 | // DoHTTP 处理HTTP请求 |
| 47 | func (this *HTMLAction) DoHTTP(req *http.Request, resp http.ResponseWriter) (goNext bool, err error) { |
| 48 | if this.config == nil { |
| 49 | goNext = true |
| 50 | return |
| 51 | } |
| 52 | resp.WriteHeader(http.StatusForbidden) // TODO改成可以配置 |
| 53 | _, _ = resp.Write([]byte(this.config.Content)) |
| 54 | return false, nil |
| 55 | } |
nothing calls this directly
no test coverage detected