MCPcopy Create free account
hub / github.com/buggregator/server / handleHTTP

Method handleHTTP

modules/proxy/server.go:137–143  ·  view source on GitHub ↗

handleHTTP handles plain HTTP proxy requests.

(ctx context.Context, conn net.Conn, req *http.Request)

Source from the content-addressed store, hash-verified

135
136// handleHTTP handles plain HTTP proxy requests.
137func (s *proxyServer) handleHTTP(ctx context.Context, conn net.Conn, req *http.Request) {
138 req.RequestURI = ""
139 if req.URL.Scheme == "" {
140 req.URL.Scheme = "http"
141 }
142 s.proxyAndRecord(ctx, conn, req, "http")
143}
144
145// proxyAndRecord forwards the request, records the exchange, and writes the response back.
146func (s *proxyServer) proxyAndRecord(ctx context.Context, w io.Writer, req *http.Request, scheme string) {

Callers 1

handleConnMethod · 0.95

Calls 1

proxyAndRecordMethod · 0.95

Tested by

no test coverage detected