MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / DoHTTP

Method DoHTTP

internal/iplibrary/action_html.go:47–55  ·  view source on GitHub ↗

DoHTTP 处理HTTP请求

(req *http.Request, resp http.ResponseWriter)

Source from the content-addressed store, hash-verified

45
46// DoHTTP 处理HTTP请求
47func (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}

Callers

nothing calls this directly

Calls 2

WriteHeaderMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected