Returning and handling error from HTTPClientAndScheme

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
This commit is contained in:
Nishant Totla
2016-04-08 12:02:16 -07:00
parent 42fc136b39
commit 1dee9cb3f0
3 changed files with 14 additions and 10 deletions

View File

@@ -93,7 +93,11 @@ func proxyAsync(engine *cluster.Engine, w http.ResponseWriter, r *http.Request,
// RequestURI may not be sent to client
r.RequestURI = ""
client, scheme := engine.HTTPClientAndScheme()
client, scheme, err := engine.HTTPClientAndScheme()
if err != nil {
return err
}
r.URL.Scheme = scheme
r.URL.Host = engine.Addr