【发布时间】: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