HTTP GET Request not captured in the network trace
I downloaded two files with a GET request, the first one with Firefox, and the second one with the object XMLHTTP.
Both downloads went OK, and the filter "http2" displays the first Get Request, but the second one is not displayed, and I don't understand the reason. A problem in my environment, or the filter not up to the purpose, or a dissection error?
Can anyone try to duplicate the problem?
The first file is downloaded in the Firefox default download directory, the second one in the constant S2File.
Here is the code in Excel, Visual Basic for Applications.
This requires a reference to Microsoft XML (in my case v6.0).
To simplify the Firefox download, it's better to prepare an empty browser window before running the sub.
Private Declare Function GetTickCount Lib "kernel32" () As Long
Sub DLsegments()
Const Firefox = "C:\Program files\Mozilla Firefox\firefox.exe"
Const S2File="c:\download\seg2.ts"
Const Quote = """"
Const Prefix = "https://d105emv5h26k8d.cloudfront.net/paessler/segment/ef460915b6d34df3bf0be4d2319642db/hls/1628590706710/ef460915b6d34df3bf0be4d2319642db-hls_0000"
Const Timeout = 10000 ' msec
Dim TimeoutElapsed As Boolean
Dim req As New MSXML2.XMLHTTP60
Dim Buf() As Byte
Dim T1, S1, S2
S1 = Prefix + "1.ts"
S2 = Prefix + "2.ts"
Shell (Quote & Firefox & Quote & " " & S1)
req.Open "GET", S2, True
T1 = GetTickCount
req.send
Do While req.ReadyState <> 4
DoEvents
If (GetTickCount - T1) > Timeout Then
TimeoutElapsed = True
Exit Do
End If
Loop
If TimeoutElapsed Then
MsgBox "S2 download timed out"
ElseIf req.Status = 200 Then
Buf = req.responseBody
Open S2File For Binary As 2
Put 2, , Buf
Close 2
MsgBox "Download successful"
Else
MsgBox "S2 download failed"
End If
End Sub