(ctx *context, req *http.Request)
| 1031 | } |
| 1032 | |
| 1033 | func (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 | |
| 1054 | func (p *Proxy) makeBackendRequest(ctx *context, requestContext stdlibcontext.Context) (*http.Response, *proxyError) { |
| 1055 | requestStopWatch, responseStopWatch := newStopWatch(), newStopWatch() |
no test coverage detected