disabling automatic video/audio streaming from fiddler core proxy without using ResponseHeadersAvailable not working . in my scenario I want to capture all video/audio requests and responses and this what I wrote so fat :
FiddlerApplication.ResponseHeadersAvailable += FProjectStatics.OnAfterSessionComplete;
public static void OnAfterSessionComplete( Session s ){
string sContentType = oS.oResponse.MIMEType;
if (sContentType.OICStartsWithAny("text/event-stream", "multipart/x-mixed-replace",
"video/", "audio/", "application/x-mms-framed"))
{
oS.bBufferResponse = false;
Console.WriteLine(s.ResponseHeaders) ;
}
}
this didn't give me anything because one ResponseHeader show up per every video/audio ..... I can't use ResponseAvailableHeader because it ignores the Response body which I'm interesting in .
any ideas ?
try this
FiddlerApplication.ResponseHeadersAvailable += FProjectStatics.OnAfterSessionComplete;
FiddlerAppication.BeforeResponse += FProjectStatics.OnBeforeResponse ;
public static void OnBeforeResponse( Session s ){
string sContentType = oS.oResponse.MIMEType;
if (sContentType.OICStartsWithAny("text/event-stream", "multipart/x-mixed-replace",
"video/", "audio/", "application/x-mms-framed"))
{
oS.bBufferResponse = false;
}
public static void OnAfterSessionComplete( Session s ){
string sContentType = oS.oResponse.MIMEType;
if (sContentType.OICStartsWithAny("text/event-stream", "multipart/x-mixed-replace",
"video/", "audio/", "application/x-mms-framed"))
{
Console.WriteLine(s.ResponseHeaders) ;
}
}
Use the handler for OnBeforeResponse to capture the body. If you want to buffer the response too, set only BufferResponse=true in the ResponseHeadersAvailable event.
To reduce confusion, please don't name your event handling method after an unrelated event (AfterSessionComplete).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With