MCPcopy
hub / github.com/NVIDIA/aistore / parseGoogleCksumHeader

Function parseGoogleCksumHeader

downloader/utils.go:205–218  ·  view source on GitHub ↗
(hdr []string)

Source from the content-addressed store, hash-verified

203}
204
205func parseGoogleCksumHeader(hdr []string) cos.SimpleKVs {
206 var (
207 h = cmn.BackendHelpers.Google
208 cksums = make(cos.SimpleKVs, 2)
209 )
210 for _, v := range hdr {
211 entry := strings.SplitN(v, "=", 2)
212 debug.Assert(len(entry) == 2)
213 if v, ok := h.EncodeCksum(entry[1]); ok {
214 cksums[entry[0]] = v
215 }
216 }
217 return cksums
218}
219
220func headLink(link string) (*http.Response, error) {
221 ctx, cancel := context.WithTimeout(context.Background(), headReqTimeout)

Callers 1

attrsFromLinkFunction · 0.85

Calls 1

AssertFunction · 0.92

Tested by

no test coverage detected