summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/nsHttpConnection.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-11 07:13:53 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-11 07:13:53 +0100
commitd394b70aa4d437233953c8e070318149276b1c7e (patch)
tree7287fa2c1bba3baa4000de994addb5d905a74326 /netwerk/protocol/http/nsHttpConnection.cpp
parent37ea3b7b873afb0f2169b1e79c90902dc26f7d2f (diff)
downloadUXP-d394b70aa4d437233953c8e070318149276b1c7e.tar
UXP-d394b70aa4d437233953c8e070318149276b1c7e.tar.gz
UXP-d394b70aa4d437233953c8e070318149276b1c7e.tar.lz
UXP-d394b70aa4d437233953c8e070318149276b1c7e.tar.xz
UXP-d394b70aa4d437233953c8e070318149276b1c7e.zip
Bug 1343600 - Add TLS handshake Start/Stop events
Diffstat (limited to 'netwerk/protocol/http/nsHttpConnection.cpp')
-rw-r--r--netwerk/protocol/http/nsHttpConnection.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp
index 916d1249c..e80607d69 100644
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -313,6 +313,13 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue,
if (NS_FAILED(rv))
goto npnComplete;
+ if (!m0RTTChecked) {
+ // We reuse m0RTTChecked. We want to send this status only once.
+ mTransaction->OnTransportStatus(mSocketTransport,
+ NS_NET_STATUS_TLS_HANDSHAKE_STARTING,
+ 0);
+ }
+
rv = ssl->GetNegotiatedNPN(negotiatedNPN);
if (!m0RTTChecked && (rv == NS_ERROR_NOT_CONNECTED) &&
!mConnInfo->UsingProxy()) {
@@ -443,6 +450,11 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue,
npnComplete:
LOG(("nsHttpConnection::EnsureNPNComplete setting complete to true"));
mNPNComplete = true;
+
+ mTransaction->OnTransportStatus(mSocketTransport,
+ NS_NET_STATUS_TLS_HANDSHAKE_ENDED,
+ 0);
+
if (mWaitingFor0RTTResponse) {
mWaitingFor0RTTResponse = false;
if (NS_FAILED(mTransaction->Finish0RTT(true))) {