diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index f3ea3e02d7d..9b1434394f2 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -5130,7 +5130,7 @@ HttpSM::do_http_server_open(bool raw) if (new_scheme_to_use >= 0) { // found a new scheme, use it scheme_to_use = new_scheme_to_use; } - if (!tls_upstream) { + if (!raw || !tls_upstream) { tls_upstream = scheme_to_use == URL_WKSIDX_HTTPS; } }