Skip to content

Commit 28ca2e8

Browse files
committed
proper check if encrypted
1 parent c55955c commit 28ca2e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/Http2Transport.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ void Http2Transport::sendRequestInLoop(const HttpRequestPtr &req,
728728
}
729729
std::string scheme = connPtr->isSSLConnection() ? "https" : "http";
730730
if (static_cast<drogon::HttpRequestImpl *>(req.get())->passThrough())
731-
scheme = (req->isOnSecureConnection()) ? "https" : "http";
731+
scheme = (req->peerCertificate() != nullptr) ? "https" : "http";
732732
vec.emplace_back(":scheme", scheme);
733733
if (auto host = req->getHeader("host"); !host.empty())
734734
vec.emplace_back(":authority", host);

0 commit comments

Comments
 (0)