Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fiddler core automatic streaming can't be disable?

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 ?

like image 968
Rambo Actionha Avatar asked Mar 09 '26 09:03

Rambo Actionha


2 Answers

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) ;
     }

}
like image 105
mahmoud nezar sarhan Avatar answered Mar 11 '26 22:03

mahmoud nezar sarhan


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).

like image 20
EricLaw Avatar answered Mar 11 '26 22:03

EricLaw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!