MCPcopy Index your code
hub / github.com/zalando/skipper / makeUpgradeRequest

Method makeUpgradeRequest

proxy/proxy.go:1033–1052  ·  view source on GitHub ↗
(ctx *context, req *http.Request)

Source from the content-addressed store, hash-verified

1031}
1032
1033func (p *Proxy) makeUpgradeRequest(ctx *context, req *http.Request) {
1034 backendURL := req.URL
1035
1036 reverseProxy := httputil.NewSingleHostReverseProxy(backendURL)
1037 reverseProxy.FlushInterval = p.flushInterval
1038 upgradeProxy := upgradeProxy{
1039 backendAddr: backendURL,
1040 reverseProxy: reverseProxy,
1041 insecure: p.flags.Insecure(),
1042 tlsClientConfig: p.clientTLS,
1043 useAuditLog: p.experimentalUpgradeAudit,
1044 auditLogOut: p.upgradeAuditLogOut,
1045 auditLogErr: p.upgradeAuditLogErr,
1046 auditLogHook: p.auditLogHook,
1047 }
1048
1049 upgradeProxy.serveHTTP(ctx.responseWriter, req)
1050 ctx.successfulUpgrade = true
1051 ctx.Logger().Debugf("finished upgraded protocol %s session", getUpgradeRequest(ctx.request))
1052}
1053
1054func (p *Proxy) makeBackendRequest(ctx *context, requestContext stdlibcontext.Context) (*http.Response, *proxyError) {
1055 requestStopWatch, responseStopWatch := newStopWatch(), newStopWatch()

Callers 1

makeBackendRequestMethod · 0.95

Calls 5

serveHTTPMethod · 0.95
getUpgradeRequestFunction · 0.85
InsecureMethod · 0.80
DebugfMethod · 0.65
LoggerMethod · 0.65

Tested by

no test coverage detected