1

I have this array

public static string[] BINARY_OPTIONS = {
        "script",
        "image",
        "stylesheet",
        "object",
        "xmlhttprequest",
        "object-subrequest",
        "subdocument",
        "document",
        "elemhide",
        "other",
        "background",
        "xbl",
        "ping",
        "dtd",
        "media",
        "third-party",
        "match-case",
        "collapse",
        "donottrack",
    };

Last 4 in array does not matter. I need to match Content-Type with one of those in array. But Content-Types i get with this code

Fiddler.FiddlerApplication.BeforeResponse += delegate(Fiddler.Session session)
{
    if (session.oResponse["Content-Type"] != null )
        Console.WriteLine(session.oResponse["Content-Type"]);
};

are like MIME Types. So I don't know which one to match. I can try, like script will match application/javascript and application/x-javascript, and image is all that starts with image (image/png, image/jpg, ...)but for subdocument (which is iframe) i dont know. Is there any site that explaines this and also how can i check in fiddler core that requests are from iframe.

clzola
  • 1,513
  • 2
  • 23
  • 36
  • The Content-Type header is *supposed* to be a MIME type. It's not clear what you are trying to do or what the real question is here – Robert Levy Oct 09 '14 at 12:57

1 Answers1

1

It is unclear what you're asking; the Array values you're showing here appear to be what you might see in Developer Tools for the source of a request, which has no inherent relationship to the type of the response.

There's no direct way, at the proxy level (e.g. Fiddler) to determine whether a request is for a top-level page or an IFRAME. You may be interested in X-Download-Initiator, which is supported for IE only. http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx

EricLaw
  • 54,427
  • 7
  • 140
  • 182