MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / addressFromURL

Function addressFromURL

handler/handler.go:154–166  ·  view source on GitHub ↗
(u *url.URL)

Source from the content-addressed store, hash-verified

152}
153
154func addressFromURL(u *url.URL) string {
155 host := u.Hostname()
156 port := u.Port()
157 if port == "" {
158 switch strings.ToLower(u.Scheme) {
159 case "http":
160 port = "80"
161 case "https":
162 port = "443"
163 }
164 }
165 return net.JoinHostPort(host, port)
166}
167
168func (s *ProxyHandler) HandleRequest(wr http.ResponseWriter, req *http.Request, username string) {
169 req.RequestURI = ""

Callers 1

HandleRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected