MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / downloadClient

Function downloadClient

pkg/go/cmd/codebase-memory-mcp/main.go:564–575  ·  view source on GitHub ↗

downloadClient validates rawURL for its mode and returns the client for it.

(rawURL string, loopback bool)

Source from the content-addressed store, hash-verified

562
563// downloadClient validates rawURL for its mode and returns the client for it.
564func downloadClient(rawURL string, loopback bool) (*http.Client, error) {
565 if loopback {
566 if err := validateLoopbackURL(rawURL); err != nil {
567 return nil, err
568 }
569 return loopbackClient, nil
570 }
571 if err := validateURLScheme(rawURL); err != nil {
572 return nil, err
573 }
574 return httpsOnlyClient, nil
575}
576
577func httpGet(rawURL, dest string, loopback bool) error {
578 client, err := downloadClient(rawURL, loopback)

Callers 2

httpGetFunction · 0.85
fetchChecksumsFunction · 0.85

Calls 2

validateLoopbackURLFunction · 0.85
validateURLSchemeFunction · 0.85

Tested by

no test coverage detected