MCPcopy Index your code
hub / github.com/SenseUnit/dumbproxy / isDirectRequest

Function isDirectRequest

handler/direct.go:5–11  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

3import "net/http"
4
5func isDirectRequest(req *http.Request) bool {
6 if req == nil || req.URL == nil || req.Method == http.MethodConnect || req.Method == "GETRANDOM" {
7 return false
8 }
9
10 return req.URL.Scheme == "" && req.URL.Host == ""
11}

Callers 2

ServeHTTPMethod · 0.85
TestIsDirectRequestFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsDirectRequestFunction · 0.68