3

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 ?

2 Answers2

1

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

EricLaw
  • 54,427
  • 7
  • 140
  • 182
1

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

}