MCPcopy
hub / github.com/containerd/containerd / requestFields

Function requestFields

core/remotes/docker/resolver.go:891–910  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

889}
890
891func requestFields(req *http.Request) log.Fields {
892 fields := map[string]any{
893 "request.method": req.Method,
894 }
895 for k, vals := range req.Header {
896 k = strings.ToLower(k)
897 if k == "authorization" {
898 continue
899 }
900 for i, v := range vals {
901 field := "request.header." + k
902 if i > 0 {
903 field = fmt.Sprintf("%s.%d", field, i)
904 }
905 fields[field] = v
906 }
907 }
908
909 return fields
910}
911
912func responseFields(resp *http.Response) log.Fields {
913 fields := map[string]any{

Callers 1

doMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…