This is a migrated thread and some comments may be shown as answers.

FiddlerScript to download 206 response content

0 Answers 183 Views
Extensions and Customization
This is a migrated thread and some comments may be shown as answers.
Dsek
Top achievements
Rank 1
Dsek asked on 03 Apr 2017, 07:23 PM

Hi,

I am trying to download a 206 response type content such as mp4.

I am able to use the below code. But when i try to open the file it says it got corrupted.

FiddlerApplication.BeforeResponse += delegate(Fiddler.Session oS)
            {
              if ((oS.responseCode == 200) && (oS.responseBodyBytes.Length > 1000))
              {
                string sMIME = oS.oResponse.MIMEType.ToLower();
                if (sMIME.StartsWith("audio/") ||
                    sMIME.StartsWith("video/") ||
                    sMIME.Contains("media"))
                {
                    oS.utilDecodeResponse();
                    oS.SaveResponseBody();                  
                }
              }
            };

Please help

 

Thanks,

Dhana

No answers yet. Maybe you can help?

Tags
Extensions and Customization
Asked by
Dsek
Top achievements
Rank 1
Share this question
or