【问题标题】:FiddlerCore and ContetTypeFiddlerCore 和 ContetType
【发布时间】:2014-10-09 12:52:32
【问题描述】:

我有这个数组

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",
    };

数组中的最后 4 位无关紧要。 我需要将 Content-Type 与数组中的一个匹配。但是我用这段代码得到的内容类型

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

类似于 MIME 类型。所以我不知道该匹配哪一个。我可以尝试,就像脚本将匹配 application/javascript 和 application/x-javascript,并且图像都是以图像(图像/png,图像/jpg,...)开头的,但对于子文档(即 iframe)我不知道.是否有任何网站可以解释这一点,以及我如何检查来自 iframe 的请求的提琴手核心。

【问题讨论】:

  • Content-Type 标头假定为 MIME 类型。目前尚不清楚您要做什么或这里的真正问题是什么

标签: c# filtering content-type fiddlercore


【解决方案1】:

不清楚你在问什么;您在此处显示的数组值似乎是您在开发者工具中看到的请求的 source 值,它与响应的 type 没有内在关系.

在代理级别(例如 Fiddler)没有直接的方法来确定请求是针对顶级页面还是 IFRAME。您可能对X-Download-Initiator 感兴趣,它仅支持 IE。 http://blogs.msdn.com/b/fiddler/archive/2011/02/10/fiddler-is-better-with-internet-explorer-9.aspx

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多