MCPcopy Create free account
hub / github.com/zalando/skipper / cloneResponseMetadata

Function cloneResponseMetadata

proxy/context.go:107–123  ·  view source on GitHub ↗
(r *http.Response)

Source from the content-addressed store, hash-verified

105}
106
107func cloneResponseMetadata(r *http.Response) *http.Response {
108 return &http.Response{
109 Status: r.Status,
110 StatusCode: r.StatusCode,
111 Proto: r.Proto,
112 ProtoMajor: r.ProtoMajor,
113 ProtoMinor: r.ProtoMinor,
114 Header: cloneHeader(r.Header),
115 Trailer: cloneHeader(r.Trailer),
116 Body: defaultBody(),
117 ContentLength: r.ContentLength,
118 TransferEncoding: r.TransferEncoding,
119 Close: r.Close,
120 Request: r.Request,
121 TLS: r.TLS,
122 }
123}
124
125// this is required during looping to preserve the original set of
126// params in the outer routes

Callers 1

setResponseMethod · 0.85

Calls 2

cloneHeaderFunction · 0.85
defaultBodyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…