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

Function cloneRequestMetadata

proxy/context.go:87–105  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

85}
86
87func cloneRequestMetadata(r *http.Request) *http.Request {
88 return &http.Request{
89 Method: r.Method,
90 URL: cloneURL(r.URL),
91 Proto: r.Proto,
92 ProtoMajor: r.ProtoMajor,
93 ProtoMinor: r.ProtoMinor,
94 Header: cloneHeader(r.Header),
95 Trailer: cloneHeader(r.Trailer),
96 Body: defaultBody(),
97 ContentLength: r.ContentLength,
98 TransferEncoding: r.TransferEncoding,
99 Close: r.Close,
100 Host: r.Host,
101 RemoteAddr: r.RemoteAddr,
102 RequestURI: r.RequestURI,
103 TLS: r.TLS,
104 }
105}
106
107func cloneResponseMetadata(r *http.Response) *http.Response {
108 return &http.Response{

Callers 1

newContextFunction · 0.85

Calls 3

cloneURLFunction · 0.85
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…