@@ -296,6 +296,14 @@ def socket_thread_http_entry(self, msg):
296296 socket = self .http ['current_socket' ]
297297 self .http ['connections' ][connection ] = {'socket' : socket }
298298 del self .http ['current_socket' ]
299+ elif msg ['message' ].startswith ('TlsHandshaker::SetupSSL ' ):
300+ match = re .search (r'^TlsHandshaker::SetupSSL (?P<connection>[\w\d]+)' ,
301+ msg ['message' ])
302+ if match :
303+ connection = match .groupdict ().get ('connection' )
304+ if connection in self .http ['connections' ]:
305+ if 'ssl_start' not in self .http ['connections' ][connection ]:
306+ self .http ['connections' ][connection ]['ssl_start' ] = msg ['timestamp' ]
299307 elif msg ['message' ].startswith ('nsHttpConnection::SetupSSL ' ):
300308 match = re .search (r'^nsHttpConnection::SetupSSL (?P<connection>[\w\d]+)' ,
301309 msg ['message' ])
@@ -332,6 +340,17 @@ def socket_thread_http_entry(self, msg):
332340 if byte_count > 0 and trans_id in self .http ['requests' ] and \
333341 'start' not in self .http ['requests' ][trans_id ]:
334342 self .http ['requests' ][trans_id ]['start' ] = msg ['timestamp' ]
343+ elif msg ['message' ].startswith ('nsHttpTransaction::OnSocketStatus ' ) and \
344+ msg ['message' ].find (' status=4b0005 progress=' ) > - 1 :
345+ match = re .search (r'^nsHttpTransaction::OnSocketStatus '
346+ r'\[this=(?P<id>[\w\d]+) status=4b0005 progress=(?P<bytes>[\d+]+)' ,
347+ msg ['message' ])
348+ if match :
349+ trans_id = match .groupdict ().get ('id' )
350+ byte_count = int (match .groupdict ().get ('bytes' ))
351+ if byte_count > 0 and trans_id in self .http ['requests' ] and \
352+ 'start' not in self .http ['requests' ][trans_id ]:
353+ self .http ['requests' ][trans_id ]['start' ] = msg ['timestamp' ]
335354 elif msg ['message' ].startswith ('nsHttpTransaction::ProcessData ' ):
336355 match = re .search (r'^nsHttpTransaction::ProcessData \[this=(?P<id>[\w\d]+)' ,
337356 msg ['message' ])
@@ -446,14 +465,15 @@ def socket_transport_entry(self, msg):
446465 port = match .groupdict ().get ('port' )
447466 self .http ['sockets' ][socket ] = {'host' : host , 'port' : port }
448467 # nsSocketTransport::SendStatus [this=143f4000 status=804b0007]
468+ # nsSocketTransport::SendStatus [this=7fe074bd2a00 status=4B0007]
449469 elif msg ['message' ].startswith ('nsSocketTransport::SendStatus ' ):
450470 match = re .search (r'^nsSocketTransport::SendStatus \['
451471 r'this=(?P<socket>[\w\d]+) '
452472 r'status=(?P<status>[\w\d]+)' , msg ['message' ])
453473 if match :
454474 socket = match .groupdict ().get ('socket' )
455475 status = match .groupdict ().get ('status' )
456- if status == '804b0007' :
476+ if status in [ '804b0007' , '4b0007' ] :
457477 if socket not in self .http ['sockets' ]:
458478 self .http ['sockets' ][socket ] = {}
459479 if 'start' not in self .http ['sockets' ][socket ]:
0 commit comments