Search code examples
c#httpproxyfiddlerfiddlercore

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 ?


Solution

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