C# 之 HttpResponse 类

      Response 对象,派生自HttpResponse 类,该类封装来自 ASP.NET 操作的 HTTP 响应信息。存在于System.Web命名空间下。

      注:MIME(Multipurpose Internet Mail Extensions)多用途互联网邮件扩展类型就是设定某种扩展名的文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候,浏览器会自动使用指定应用程序来打开。多用于指定一些客户端自定义的文件名,以及一些媒体文件打开方式。 

      (一)构造函数:public HttpResponse(TextWriter writer)

名称 用法 说明
Buffer Response.Buffer  = true

获取或设置一个值,该值指示是否缓冲输出并在处理完整个响应之后发送它。

(true or false)

BufferOutput Response.BufferOutput = true;

获取或设置一个值,该值指示是否缓冲输出并在处理完整个页之后发送它。

(true or false)

Cache  Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetValidUntilExpires(false);
Response.Cache.VaryByParams["Category"] = true;

if (Response.Cache.VaryByParams["Category"])
{
   //...
}
获取网页的缓存策略(例如:过期时间、保密性设置和变化条款)。
CacheControl   获取或设置与 HttpCacheability枚举值之一匹配的 Cache-Control HTTP 标头。
Charset Response.Charset == "iso-8859-2" 获取或设置输出流的 HTTP 字符集。
ClientDisconnectedToken   获取客户端断开时去除的 CancellationToken对象。
ContentEncoding Response.ContentEncoding.EncodingName 获取或设置输出流的 HTTP 字符集。
ContentType

Response.ContentType = "image/jpeg";  等同于

Response.AddHeader("content-type", "image/jpeg");

获取或设置输出流的 HTTP MIME 类型,来区分不同种类的数据。
Cookies HttpCookie MyCookie = new HttpCookie("LastVisit");
DateTime now = DateTime.Now;
MyCookie.Value = now.ToString();
MyCookie.Expires = now.AddHours(1);
Response.Cookies.Add(MyCookie);
获取响应 Cookie 集合。
Expires  

获取或设置在浏览器上缓存的页过期之前的分钟数。如果用户在页面过期之前返回到该页,则显示缓存的版本。提供 Expires是为了与 ASP 的早期版本兼容。

ExpiresAbsolute  

获取或设置从缓存中移除缓存信息的绝对日期和时间。

提供 ExpiresAbsolute是为了与 ASP 的早期版本兼容。

Filter  Response.Filter = new UpperCaseFilterStream(Response.Filter); 获取或设置一个包装筛选器对象,该对象用于在传输之前修改 HTTP 实体主体。
HeaderEncoding   获取或设置一个 Encoding象,该对象表示当前标头输出流的编码。
Headers   获取响应标头的集合。
IsClientConnected  Response.IsClientConnected 获取一个值,通过该值指示客户端是否仍连接在服务器上。(true or false)
IsRequestBeingRedirected   获取一个布尔值,该值指示客户端是否正在被传输到新的位置。
Output  if (IsPostBack)
{
     Server.HtmlEncode(txtSubmitString.Text, Response.Output);
}
启用到输出 HTTP 响应流的文本输出。
OutputStream  bmp.Save(Response.OutputStream, ImageFormat.Jpeg); 启用到输出 HTTP 内容主体的二进制输出。
RedirectLocation  Response.RedirectLocation = "http://www.newurl.com "; 获取或设置 Http Location 标头的值。
Status   设置返回到客户端的 Status 栏。
StatusCode  Response.StatusCode != 200 获取或设置返回给客户端的输出的 HTTP 状态代码。
StatusDescription  Response.StatusDescription != "OK" 获取或设置返回给客户端的输出的 HTTP 状态字符串。
SubStatusCode  context.Response.SubStatusCode = 99; 获取或设置一个限定响应的状态代码的值。
SupportsAsyncFlush   获取一个值,该值指示集合是否支持异步刷新操作。
SuppressContent  Response.SuppressContent = true; 获取或设置一个值,该值指示是否将 HTTP 内容发送到客户端。
SuppressFormsAuthenticationRedirect   获取或设置指定重定向至登录页的 forms 身份验证是否应取消的值。
TrySkipIisCustomErrors   获取或设置一个值,该值指定是否禁用 IIS 7.0 自定义错误。(true or false)

      (三)方法:

名称 用法 说明
AddCacheDependency(params CacheDependency[] dependencies) CacheDependency authorsDependency = new CacheDependency("authors.xml");      
Response.AddCacheDependency(authorsDependency);
将一组缓存依赖项与响应关联,这样,如果响应存储在输出缓存中并且指定的依赖项发生变化,就可以使该响应失效。
AddCacheItemDependencies(ArrayList cacheKeys) ArrayList deps = new ArrayList();
deps.Add("bookData");
deps.Add("authorData");    
Response.AddCacheItemDependencies(deps);
使缓存响应的有效性依赖于缓存中的其他项。
AddCacheItemDependencies(string[] cacheKeys)   使缓存项的有效性依赖于缓存中的另一项。
AddCacheItemDependency(string cacheKey)

 Response.AddCacheItemDependency("bookData");

使缓存响应的有效性依赖于缓存中的其他项。
AddFileDependencies(ArrayList filenames)

ArrayList fileList = new ArrayList(); fileList.Add(file1); fileList.Add(file2);

Response.AddFileDependencies(fileList);

将一组文件名添加到文件名集合中,当前响应依赖于该集合。
AddFileDependencies(string[] filenames) String[] FileNames = new String[3];
FileNames[0] = "Test.txt";
FileNames[1] = "Test2.txt";
FileNames[2] = "Test3.txt";
Response.AddFileDependencies(FileNames);
将一个文件名数组添加到当前响应依赖的文件名集合中。
AddFileDependency(string filename) String FileName = "C:\\Files\\F1.txt";
Response.AddFileDependency(FileName);
将单个文件名添加到文件名集合中,当前响应依赖于该集合。
AddHeader(string name,string value)

Response.AddHeader("Content-Type","image/jpeg");  等同于

Response.ContentType = "image/jpeg";

将 HTTP 头添加到输出流。提供 AddHeader 是为了与 ASP 的早期版本兼容。
AppendCookie(HttpCookie cookie) HttpCookie MyCookie = new HttpCookie("LastVisit");
MyCookie.Value = DateTime.Now.ToString();
Response.AppendCookie(MyCookie);
基础结构。将一个 HTTP Cookie 添加到内部 Cookie 集合。
AppendHeader(string name, string value ) Response.AppendHeader("CustomAspNetHeader", "Value1"); 将 HTTP 头添加到输出流。
AppendToLog(stringparam) Response.AppendToLog("Page delivered"); 将自定义日志信息添加到 Internet 信息服务 (IIS) 日志文件。
ApplyAppPathModifier(string virtualPath) string urlConverted = Response.ApplyAppPathModifier("TestPage.aspx"); 如果会话使用 Cookieless 会话状态,则将该会话 ID 添加到虚拟路径中,并返回组合路径。如果不使用 Cookieless 会话状态,则 ApplyAppPathModifier 返回原始的虚拟路径。
BeginFlush(AsyncCallback callback,
Object state)
public IAsyncResult BeginFlush(AsyncCallback callback,
Object state)
向客户端发送当前所有缓冲的响应。
BinaryWrite(byte[] buffer) byte[] Buffer = new byte[(int)FileSize];
MyFileStream.Read(Buffer, 0, (int)FileSize);
MyFileStream.Close();
Response.Write("<b>File Contents: </b>");
Response.BinaryWrite(Buffer);
将一个二进制字符串写入 HTTP 输出流。
Clear() Response.Clear(); 清除缓冲区流中的所有内容输出。
ClearContent() Response.ClearContent(); 清除缓冲区流中的所有内容输出。
ClearHeaders() Response.ClearHeaders(); 清除缓冲区流中的所有头。
Close() Response.Close(); 关闭到客户端的套接字连接。
DisableKernelCache() public void DisableKernelCache() 禁用当前响应的内核缓存。
DisableUserCache() public void DisableUserCache() 禁用 IIS 用户-方式来缓存反映。
End() Response.End(); 将当前所有缓冲的输出发送到客户端,停止该页的执行,并引发 EndRequest 事件。
EndFlush public void EndFlush(IAsyncResult asyncResult) 完成异步刷新操作。
Equals(Object obj) Console.WriteLine("person1a and person1b: {0}", ((object) person1a).Equals((object) person1b));
Console.WriteLine("person1a and person2: {0}", ((object) person1a).Equals((object) person2));
确定指定的对象是否等于当前对象。 (继承自 Object。)
Flush() Response.Flush(); 向客户端发送当前所有缓冲的输出。
GetHashCode() public virtual int GetHashCode() 作为默认哈希函数。 (继承自 Object。)
GetType() Console.WriteLine("n1 and n2 are the same type: {0}",
Object.ReferenceEquals(n1.GetType(), n2.GetType()));
获取当前实例的 Type。 (继承自 Object。)
Pics(string value ) Response.Pics( 
"(pics-1.1 <http://www.icra.org/ratingsv02.html> " + "comment <ICRAonline EN v2.0> " + 
"l r (nz 1 vz 1 lz 1 oz 1 cz 1) " + "<http://www.rsac.org/ratingsv01.html> " +
" l r (n 0 s 0 v 0 l 0))");
将一个 HTTP PICS-Label 标头追加到输出流。
Redirect(string url) Response.Redirect("http://www.microsoft.com/gohere/look.htm"); 将请求重定向到新 URL 并指定该新 URL。
Redirect(string url, bool endResponse) Response.Redirect("default.aspx", false); 将客户端重定向到新的 URL。指定新的 URL 并指定当前页的执行是否应终止。
RedirectPermanent(string url) public void RedirectPermanent(string url) 执行从所请求 URL 到所指定 URL 的永久重定向。
RedirectPermanent(string url, bool endResponse) public void RedirectPermanent(string url,bool endResponse) 执行从所请求 URL 到所指定 URL 的永久重定向,并提供用于完成响应的选项。
RedirectToRoute(Object routeValues) Response.RedirectToRoute(new { productid = "1", category = "widgets" }); 使用路由参数值将请求重定向到新 URL。
RedirectToRoute(RouteValueDictionary routeValues) Response.RedirectToRoute((new RouteValueDictionary {productId="1", category="widgets"}); 使用路由参数值将请求重定向到新 URL。
RedirectToRoute(string routeName) Response.RedirectToRoute("Products"); 使用路由名称将请求重定向到新 URL。
RedirectToRoute(string routeName, Object routeValues) Response.RedirectToRoute("Product",new { productid = "1", category = "widgets" }); 使用路由参数值和路由名称将请求重定向到新 URL。
RedirectToRoute(string routeName, RouteValueDictionary routeValues) Response.RedirectToRoute("Product",(new RouteValueDictionary {productId="1", category="widgets"})); 使用路由参数值和路由名称将请求重定向到新 URL。
RedirectToRoutePermanent(Object routeValues) Response.RedirectToRoutePermanent(new { productid = "1", category = "widgets" }); 使用路由参数值执行从所请求 URL 到新 URL 的永久重定向。
RedirectToRoutePermanent(RouteValueDictionary routeValues) Response.RedirectToRoutePermanent(new RouteValueDictionary {productId="1", category="widgets"}); 使用路由参数值执行从所请求 URL 到新 URL 的永久重定向。
RedirectToRoutePermanent(string routeName) Response.RedirectToRoutePermanent("Products"); 使用路由名称执行从所请求 URL 到新 URL 的永久重定向。
RedirectToRoutePermanent(string routeName, Object routeValues) Response.RedirectToRoutePermanent("Product",
new { productid = "1", category = "widgets" });
使用路由参数值以及与新 URL 对应的路由的名称执行从所请求 URL 到新 URL 的永久重定向。
RedirectToRoutePermanent(string routeName, RouteValueDictionary routeValues) Response.RedirectToRoutePermanent("Product",new RouteValueDictionary {productId="1", category="widgets"}); 使用路由参数值和路由名称执行从所请求 URL 到新 URL 的永久重定向。
RemoveOutputCacheItem(string path) public static void RemoveOutputCacheItem(string path) 从缓存中移除与默认输出缓存提供程序关联的所有缓存项。此方法是静态的。
RemoveOutputCacheItem(string path,
string providerName
)
public static void RemoveOutputCacheItem(string path,string providerName) 使用指定的输出缓存提供程序移除与指定路径关联的所有输出缓存项。
SetCookie(HttpCookie cookie) MyCookie.Value = DateTime.Now.ToString();
Response.Cookies.Add(MyCookie);
基础结构。更新 Cookie 集合中的一个现有 Cookie。
ToString() public virtual string ToString() 返回表示当前对象的字符串。 (继承自 Object。)
TransmitFile(string filename) public void TransmitFile(string filename) 将指定的文件直接写入 HTTP 响应输出流,而不在内存中缓冲该文件。
TransmitFile(string, Int64, Int64) public void TransmitFile(string filename,long offset,long length) 将文件的指定部分直接写入 HTTP 响应输出流,而不在内存中缓冲它。
Write(Char ch) char[] charArray = {'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd'};
Response.Write(';');
将一个字符写入 HTTP 响应输出流。
Write(Object obj) object obj = (object)13;
Response.Write(obj);
Object 写入 HTTP 响应流。
Write(string str) Response.Write("Hello " + Server.HtmlEncode(Request.QueryString["UserName"]) + "<br>"); 将一个字符串写入 HTTP 响应输出流。
Write(char[] buffer,int index,int count) Response.Write(charArray, 0, charArray.Length); 将一个字符数组写入 HTTP 响应输出流。
WriteFile(string fileName) Response.Write("Please Login: <br>");
Response.WriteFile("login.txt");
将指定文件的内容作为文件块直接写入 HTTP 响应输出流。
WriteFile(string filename, bool readIntoMemory) Response.WriteFile("login.txt", true); 将指定文件的内容作为内存块直接写入 HTTP 响应输出流。
WriteFile(IntPtr fileHandle, long offset,
long size
)
String FileName;
FileStream MyFileStream;
IntPtr FileHandle;
long StartPos = 0, FileSize;

FileName = "c:\\temp\\Login.txt";

MyFileStream = new FileStream(FileName, FileMode.Open);
FileHandle = MyFileStream.Handle;
FileSize = MyFileStream.Length;

Response.Write("<b>Login: </b>");
Response.Write("<input type=text id=user /> ");
Response.Write("<input type=submit value=Submit /><br><br>");

Response.WriteFile(FileHandle, StartPos, FileSize);

MyFileStream.Close();
将指定的文件直接写入 HTTP 响应输出流。
WriteFile(string fileName, Int64 offSet, Int64 size) String FileName;
FileInfo MyFileInfo;
long StartPos = 0, FileSize;

FileName = "c:\\temp\\login.txt";
MyFileInfo = new FileInfo(FileName);
FileSize = MyFileInfo.Length;

Response.Write("Please Login: <br>");
Response.WriteFile(FileName, StartPos, FileSize);
将指定的文件直接写入 HTTP 响应输出流。
WriteSubstitution(HttpResponseSubstitutionCallback callback) public void WriteSubstitution(HttpResponseSubstitutionCallback callback) 允许将响应替换块插入响应,从而允许为缓存的输出响应动态生成指定的响应区域。

注意:HttpResponse 类的方法和属性通过 HttpApplication、HttpContext、Page和 UserControl类的 Response属性公开。

仅在回发情况(不包括异步回发情况)下才支持 HttpResponse 类的以下方法:Binary,WriteClear,ClearContent,ClearHeaders,Close,End,Flush,TransmitFile,Write,WriteFile,WriteSubstitution.

<%@ Page Language="C#" %>

<%@ import Namespace="System.Drawing" %>

<%@ import Namespace="System.Drawing.Imaging" %>

<%@ import Namespace="System.Drawing.Drawing2D" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">



    private void Page_Load(object sender, EventArgs e)

    {

        // 设置页面的ContentType为JPEG 文件

        //

        Response.ContentType = "image/jpeg";

        Response.Clear();



        // Buffer response so that page is sent

        // after processing is complete.

        Response.BufferOutput = true;



        // Create a font style.

        Font rectangleFont = new Font(

            "Arial", 10, FontStyle.Bold);



        // Create integer variables.

        int height = 100;

        int width = 200;



        // Create a random number generator and create

        // variable values based on it.

        Random r = new Random();

        int x = r.Next(75);

        int a = r.Next(155);

        int x1 = r.Next(100);



        // Create a bitmap and use it to create a

        // Graphics object.

        Bitmap bmp = new Bitmap(

            width, height, PixelFormat.Format24bppRgb);

        Graphics g = Graphics.FromImage(bmp);



        g.SmoothingMode = SmoothingMode.AntiAlias;

        g.Clear(Color.LightGray);



        // Use the Graphics object to draw three rectangles.

        g.DrawRectangle(Pens.White, 1, 1, width-3, height-3);

        g.DrawRectangle(Pens.Aquamarine, 2, 2, width-3, height-3);

        g.DrawRectangle(Pens.Black, 0, 0, width, height);



        // Use the Graphics object to write a string

        // on the rectangles.

        g.DrawString(

            "ASP.NET Samples", rectangleFont,

            SystemBrushes.WindowText, new PointF(10, 40));



        // Apply color to two of the rectangles.

        g.FillRectangle(

            new SolidBrush(

                Color.FromArgb(a, 255, 128, 255)),

            x, 20, 100, 50);



        g.FillRectangle(

            new LinearGradientBrush(

                new Point(x, 10),

                new Point(x1 + 75, 50 + 30),

                Color.FromArgb(128, 0, 0, 128),

                Color.FromArgb(255, 255, 255, 240)),

            x1, 50, 75, 30);



        // Save the bitmap to the response stream and

        // convert it to JPEG format.

        bmp.Save(Response.OutputStream, ImageFormat.Jpeg);



        // Release memory used by the Graphics object

        // and the bitmap.

        g.Dispose();

        bmp.Dispose();



        // Send the output to the client.

        Response.Flush();

    }



</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head>

    <title>ASP.NET Example</title>

</head>

<body>

    <form id="form1" runat="server">

    </form>

</body>

</html>
View Code

 

附:Response的ContentType类型对照表

类型列表如下: 

文件扩展名 Content-Type(Mime-Type) 文件扩展名 Content-Type(Mime-Type)
.*( 二进制流,不知道下载文件类型) application/octet-stream .tif image/tiff
.001 application/x-001 .301 application/x-301
.323 text/h323 .906 application/x-906
.907 drawing/907 .a11 application/x-a11
.acp audio/x-mei-aac .ai application/postscript
.aif audio/aiff .aifc audio/aiff
.aiff audio/aiff .anv application/x-anv
.asa text/asa .asf video/x-ms-asf
.asp text/asp .asx video/x-ms-asf
.au audio/basic .avi video/avi
.awf application/vnd.adobe.workflow .biz text/xml
.bmp application/x-bmp .bot application/x-bot
.c4t application/x-c4t .c90 application/x-c90
.cal application/x-cals .cat application/vnd.ms-pki.seccat
.cdf application/x-netcdf .cdr application/x-cdr
.cel application/x-cel .cer application/x-x509-ca-cert
.cg4 application/x-g4 .cgm application/x-cgm
.cit application/x-cit .class java/*
.cml text/xml .cmp application/x-cmp
.cmx application/x-cmx .cot application/x-cot
.crl application/pkix-crl .crt application/x-x509-ca-cert
.csi application/x-csi .css text/css
.cut application/x-cut .dbf application/x-dbf
.dbm application/x-dbm .dbx application/x-dbx
.dcd text/xml .dcx application/x-dcx
.der application/x-x509-ca-cert .dgn application/x-dgn
.dib application/x-dib .dll application/x-msdownload
.doc application/msword .dot application/msword
.drw application/x-drw .dtd text/xml
.dwf Model/vnd.dwf .dwf application/x-dwf
.dwg application/x-dwg .dxb application/x-dxb
.dxf application/x-dxf .edn application/vnd.adobe.edn
.emf application/x-emf .eml message/rfc822
.ent text/xml .epi application/x-epi
.eps application/x-ps .eps application/postscript
.etd application/x-ebx .exe application/x-msdownload
.fax image/fax .fdf application/vnd.fdf
.fif application/fractals .fo text/xml
.frm application/x-frm .g4 application/x-g4
.gbr application/x-gbr . application/x-
.gif image/gif .gl2 application/x-gl2
.gp4 application/x-gp4 .hgl application/x-hgl
.hmr application/x-hmr .hpg application/x-hpgl
.hpl application/x-hpl .hqx application/mac-binhex40
.hrf application/x-hrf .hta application/hta
.htc text/x-component .htm text/html
.html text/html .htt text/webviewhtml
.htx text/html .icb application/x-icb
.ico image/x-icon .ico application/x-ico
.iff application/x-iff .ig4 application/x-g4
.igs application/x-igs .iii application/x-iphone
.img application/x-img .ins application/x-internet-signup
.isp application/x-internet-signup .IVF video/x-ivf
.java java/* .jfif image/jpeg
.jpe image/jpeg .jpe application/x-jpe
.jpeg image/jpeg .jpg image/jpeg
.jpg application/x-jpg .js application/x-javascript
.jsp text/html .la1 audio/x-liquid-file
.lar application/x-laplayer-reg .latex application/x-latex
.lavs audio/x-liquid-secure .lbm application/x-lbm
.lmsff audio/x-la-lms .ls application/x-javascript
.ltr application/x-ltr .m1v video/x-mpeg
.m2v video/x-mpeg .m3u audio/mpegurl
.m4e video/mpeg4 .mac application/x-mac
.man application/x-troff-man .math text/xml
.mdb application/msaccess .mdb application/x-mdb
.mfp application/x-shockwave-flash .mht message/rfc822
.mhtml message/rfc822 .mi application/x-mi
.mid audio/mid .midi audio/mid
.mil application/x-mil .mml text/xml
.mnd audio/x-musicnet-download .mns audio/x-musicnet-stream
.mocha application/x-javascript .movie video/x-sgi-movie
.mp1 audio/mp1 .mp2 audio/mp2
.mp2v video/mpeg .mp3 audio/mp3
.mp4 video/mpeg4 .mpa video/x-mpg
.mpd application/vnd.ms-project .mpe video/x-mpeg
.mpeg video/mpg .mpg video/mpg
.mpga audio/rn-mpeg .mpp application/vnd.ms-project
.mps video/x-mpeg .mpt application/vnd.ms-project
.mpv video/mpg .mpv2 video/mpeg
.mpw application/vnd.ms-project .mpx application/vnd.ms-project
.mtx text/xml .mxp application/x-mmxp
.net image/pnetvue .nrf application/x-nrf
.nws message/rfc822 .odc text/x-ms-odc
.out application/x-out .p10 application/pkcs10
.p12 application/x-pkcs12 .p7b application/x-pkcs7-certificates
.p7c application/pkcs7-mime .p7m application/pkcs7-mime
.p7r application/x-pkcs7-certreqresp .p7s application/pkcs7-signature
.pc5 application/x-pc5 .pci application/x-pci
.pcl application/x-pcl .pcx application/x-pcx
.pdf application/pdf .pdf application/pdf
.pdx application/vnd.adobe.pdx .pfx application/x-pkcs12
.pgl application/x-pgl .pic application/x-pic
.pko application/vnd.ms-pki.pko .pl application/x-perl
.plg text/html .pls audio/scpls
.plt application/x-plt .png image/png
.png application/x-png .pot application/vnd.ms-powerpoint
.ppa application/vnd.ms-powerpoint .ppm application/x-ppm
.pps application/vnd.ms-powerpoint .ppt application/vnd.ms-powerpoint
.ppt application/x-ppt .pr application/x-pr
.prf application/pics-rules .prn application/x-prn
.prt application/x-prt .ps application/x-ps
.ps application/postscript .ptn application/x-ptn
.pwz application/vnd.ms-powerpoint .r3t text/vnd.rn-realtext3d
.ra audio/vnd.rn-realaudio .ram audio/x-pn-realaudio
.ras application/x-ras .rat application/rat-file
.rdf text/xml .rec application/vnd.rn-recording
.red application/x-red .rgb application/x-rgb
.rjs application/vnd.rn-realsystem-rjs .rjt application/vnd.rn-realsystem-rjt
.rlc application/x-rlc .rle application/x-rle
.rm application/vnd.rn-realmedia .rmf application/vnd.adobe.rmf
.rmi audio/mid .rmj application/vnd.rn-realsystem-rmj
.rmm audio/x-pn-realaudio .rmp application/vnd.rn-rn_music_package
.rms application/vnd.rn-realmedia-secure .rmvb application/vnd.rn-realmedia-vbr
.rmx application/vnd.rn-realsystem-rmx .rnx application/vnd.rn-realplayer
.rp image/vnd.rn-realpix .rpm audio/x-pn-realaudio-plugin
.rsml application/vnd.rn-rsml .rt text/vnd.rn-realtext
.rtf application/msword .rtf application/x-rtf
.rv video/vnd.rn-realvideo .sam application/x-sam
.sat application/x-sat .sdp application/sdp
.sdw application/x-sdw .sit application/x-stuffit
.slb application/x-slb .sld application/x-sld
.slk drawing/x-slk .smi application/smil
.smil application/smil .smk application/x-smk
.snd audio/basic .sol text/plain
.sor text/plain .spc application/x-pkcs7-certificates
.spl application/futuresplash .spp text/xml
.ssm application/streamingmedia .sst application/vnd.ms-pki.certstore
.stl application/vnd.ms-pki.stl .stm text/html
.sty application/x-sty .svg text/xml
.swf application/x-shockwave-flash .tdf application/x-tdf
.tg4 application/x-tg4 .tga application/x-tga
.tif image/tiff .tif application/x-tif
.tiff image/tiff .tld text/xml
.top drawing/x-top .torrent application/x-bittorrent
.tsd text/xml .txt text/plain
.uin application/x-icq .uls text/iuls
.vcf text/x-vcard .vda application/x-vda
.vdx application/vnd.visio .vml text/xml
.vpg application/x-vpeg005 .vsd application/vnd.visio
.vsd application/x-vsd .vss application/vnd.visio
.vst application/vnd.visio .vst application/x-vst
.vsw application/vnd.visio .vsx application/vnd.visio
.vtx application/vnd.visio .vxml text/xml
.wav audio/wav .wax audio/x-ms-wax
.wb1 application/x-wb1 .wb2 application/x-wb2
.wb3 application/x-wb3 .wbmp image/vnd.wap.wbmp
.wiz application/msword .wk3 application/x-wk3
.wk4 application/x-wk4 .wkq application/x-wkq
.wks application/x-wks .wm video/x-ms-wm
.wma audio/x-ms-wma .wmd application/x-ms-wmd
.wmf application/x-wmf .wml text/vnd.wap.wml
.wmv video/x-ms-wmv .wmx video/x-ms-wmx
.wmz application/x-ms-wmz .wp6 application/x-wp6
.wpd application/x-wpd .wpg application/x-wpg
.wpl application/vnd.ms-wpl .wq1 application/x-wq1
.wr1 application/x-wr1 .wri application/x-wri
.wrk application/x-wrk .ws application/x-ws
.ws2 application/x-ws .wsc text/scriptlet
.wsdl text/xml .wvx video/x-ms-wvx
.xdp application/vnd.adobe.xdp .xdr text/xml
.xfd application/vnd.adobe.xfd .xfdf application/vnd.adobe.xfdf
.xhtml text/html .xls application/vnd.ms-excel
.xls application/x-xls .xlw application/x-xlw
.xml text/xml .xpl audio/scpls
.xq text/xml .xql text/xml
.xquery text/xml .xsd text/xml
.xsl text/xml .xslt text/xml
.xwd application/x-xwd .x_b application/x-x_b
.sis application/vnd.symbian.install .sisx application/vnd.symbian.install
.x_t application/x-x_t .ipa application/vnd.iphone
.apk application/vnd.android.package-archive .xap application/x-silverlight-app

你可能感兴趣的:(response)