HTTP content-type

Content-Type(内容类型),一般是指网页中存在的 Content-Type,用于定义网络文件的类型和网页的编码,决定浏览器将以什么形式、什么编码读取这个文件,这就是经常看到一些 PHP 网页点击的结果却是下载一个文件或一张图片的原因。Content-Type 标头告诉客户端实际返回的内容的内容类型。语法格式:Content-Type: text/html; charset=utf-8Content-Type: multipart/form-data; boundary=something实例:

常见的媒体格式类型如下:text/html : HTML格式text/plain :纯文本格式text/xml : XML格式image/gif :gif图片格式image/jpeg :jpg图片格式image/png:png图片格式以application开头的媒体格式类型:application/xhtml+xml :XHTML格式application/xml: XML数据格式application/atom+xml :Atom XML聚合格式application/json: JSON数据格式application/pdf:pdf格式application/msword : Word文档格式application/octet-stream : 二进制流数据(如常见的文件下载)application/x-www-form-urlencoded : <form encType=””>中默认的encType,form表单数据被编码为key/value格式发送到服务器(表单默认的提交数据的格式)另外一种常见的媒体格式是上传文件之时使用的:multipart/form-data : 需要在表单中进行文件上传时,就需要使用该格式HTTP content-type 对照表文件扩展名Content-Type(Mime-Type)文件扩展名Content-Type(Mime-Type).*( 二进制流,不知道下载文件类型)application/octet-stream.tifimage/tiff.001application/x-001.301application/x-301.323text/h323.906application/x-906.907drawing/907.a11application/x-a11.acpaudio/x-mei-aac.aiapplication/postscript.aifaudio/aiff.aifcaudio/aiff.aiffaudio/aiff.anvapplication/x-anv.asatext/asa.asfvideo/x-ms-asf.asptext/asp.asxvideo/x-ms-asf.auaudio/basic.avivideo/avi.awfapplication/vnd.adobe.workflow.biztext/xml.bmpapplication/x-bmp.botapplication/x-bot.c4tapplication/x-c4t.c90application/x-c90.calapplication/x-cals.catapplication/vnd.ms-pki.seccat.cdfapplication/x-netcdf.cdrapplication/x-cdr.celapplication/x-cel.cerapplication/x-x509-ca-cert.cg4application/x-g4.cgmapplication/x-cgm.citapplication/x-cit.classjava/*.cmltext/xml.cmpapplication/x-cmp.cmxapplication/x-cmx.cotapplication/x-cot.crlapplication/pkix-crl.crtapplication/x-x509-ca-cert.csiapplication/x-csi.csstext/css.cutapplication/x-cut.dbfapplication/x-dbf.dbmapplication/x-dbm.dbxapplication/x-dbx.dcdtext/xml.dcxapplication/x-dcx.derapplication/x-x509-ca-cert.dgnapplication/x-dgn.dibapplication/x-dib.dllapplication/x-msdownload.docapplication/msword.dotapplication/msword.drwapplication/x-drw.dtdtext/xml.dwfModel/vnd.dwf.dwfapplication/x-dwf.dwgapplication/x-dwg.dxbapplication/x-dxb.dxfapplication/x-dxf.ednapplication/vnd.adobe.edn.emfapplication/x-emf.emlmessage/rfc822.enttext/xml.epiapplication/x-epi.epsapplication/x-ps.epsapplication/postscript.etdapplication/x-ebx.exeapplication/x-msdownload.faximage/fax.fdfapplication/vnd.fdf.fifapplication/fractals.fotext/xml.frmapplication/x-frm.g4application/x-g4.gbrapplication/x-gbr.application/x-.gifimage/gif.gl2application/x-gl2.gp4application/x-gp4.hglapplication/x-hgl.hmrapplication/x-hmr.hpgapplication/x-hpgl.hplapplication/x-hpl.hqxapplication/mac-binhex40.hrfapplication/x-hrf.htaapplication/hta.htctext/x-component.htmtext/html.htmltext/html.htttext/webviewhtml.htxtext/html.icbapplication/x-icb.icoimage/x-icon.icoapplication/x-ico.iffapplication/x-iff.ig4application/x-g4.igsapplication/x-igs.iiiapplication/x-iphone.imgapplication/x-img.insapplication/x-internet-signup.ispapplication/x-internet-signup.IVFvideo/x-ivf.javajava/*.jfifimage/jpeg.jpeimage/jpeg.jpeapplication/x-jpe.jpegimage/jpeg.jpgimage/jpeg.jpgapplication/x-jpg.jsapplication/x-javascript.jsptext/html.la1audio/x-liquid-file.larapplication/x-laplayer-reg.latexapplication/x-latex.lavsaudio/x-liquid-secure.lbmapplication/x-lbm.lmsffaudio/x-la-lms.lsapplication/x-javascript.ltrapplication/x-ltr.m1vvideo/x-mpeg.m2vvideo/x-mpeg.m3uaudio/mpegurl.m4evideo/mpeg4.macapplication/x-mac.manapplication/x-troff-man.mathtext/xml.mdbapplication/msaccess.mdbapplication/x-mdb.mfpapplication/x-shockwave-flash.mhtmessage/rfc822.mhtmlmessage/rfc822.miapplication/x-mi.midaudio/mid.midiaudio/mid.milapplication/x-mil.mmltext/xml.mndaudio/x-musicnet-download.mnsaudio/x-musicnet-stream.mochaapplication/x-javascript.movievideo/x-sgi-movie.mp1audio/mp1.mp2audio/mp2.mp2vvideo/mpeg.mp3audio/mp3.mp4video/mpeg4.mpavideo/x-mpg.mpdapplication/vnd.ms-project.mpevideo/x-mpeg.mpegvideo/mpg.mpgvideo/mpg.mpgaaudio/rn-mpeg.mppapplication/vnd.ms-project.mpsvideo/x-mpeg.mptapplication/vnd.ms-project.mpvvideo/mpg.mpv2video/mpeg.mpwapplication/vnd.ms-project.mpxapplication/vnd.ms-project.mtxtext/xml.mxpapplication/x-mmxp.netimage/pnetvue.nrfapplication/x-nrf.nwsmessage/rfc822.odctext/x-ms-odc.outapplication/x-out.p10application/pkcs10.p12application/x-pkcs12.p7bapplication/x-pkcs7-certificates.p7capplication/pkcs7-mime.p7mapplication/pkcs7-mime.p7rapplication/x-pkcs7-certreqresp.p7sapplication/pkcs7-signature.pc5application/x-pc5.pciapplication/x-pci.pclapplication/x-pcl.pcxapplication/x-pcx.pdfapplication/pdf.pdfapplication/pdf.pdxapplication/vnd.adobe.pdx.pfxapplication/x-pkcs12.pglapplication/x-pgl.picapplication/x-pic.pkoapplication/vnd.ms-pki.pko.plapplication/x-perl.plgtext/html.plsaudio/scpls.pltapplication/x-plt.pngimage/png.pngapplication/x-png.potapplication/vnd.ms-powerpoint.ppaapplication/vnd.ms-powerpoint.ppmapplication/x-ppm.ppsapplication/vnd.ms-powerpoint.pptapplication/vnd.ms-powerpoint.pptapplication/x-ppt.prapplication/x-pr.prfapplication/pics-rules.prnapplication/x-prn.prtapplication/x-prt.psapplication/x-ps.psapplication/postscript.ptnapplication/x-ptn.pwzapplication/vnd.ms-powerpoint.r3ttext/vnd.rn-realtext3d.raaudio/vnd.rn-realaudio.ramaudio/x-pn-realaudio.rasapplication/x-ras.ratapplication/rat-file.rdftext/xml.recapplication/vnd.rn-recording.redapplication/x-red.rgbapplication/x-rgb.rjsapplication/vnd.rn-realsystem-rjs.rjtapplication/vnd.rn-realsystem-rjt.rlcapplication/x-rlc.rleapplication/x-rle.rmapplication/vnd.rn-realmedia.rmfapplication/vnd.adobe.rmf.rmiaudio/mid.rmjapplication/vnd.rn-realsystem-rmj.rmmaudio/x-pn-realaudio.rmpapplication/vnd.rn-rn_music_package.rmsapplication/vnd.rn-realmedia-secure.rmvbapplication/vnd.rn-realmedia-vbr.rmxapplication/vnd.rn-realsystem-rmx.rnxapplication/vnd.rn-realplayer.rpimage/vnd.rn-realpix.rpmaudio/x-pn-realaudio-plugin.rsmlapplication/vnd.rn-rsml.rttext/vnd.rn-realtext.rtfapplication/msword.rtfapplication/x-rtf.rvvideo/vnd.rn-realvideo.samapplication/x-sam.satapplication/x-sat.sdpapplication/sdp.sdwapplication/x-sdw.sitapplication/x-stuffit.slbapplication/x-slb.sldapplication/x-sld.slkdrawing/x-slk.smiapplication/smil.smilapplication/smil.smkapplication/x-smk.sndaudio/basic.soltext/plain.sortext/plain.spcapplication/x-pkcs7-certificates.splapplication/futuresplash.spptext/xml.ssmapplication/streamingmedia.sstapplication/vnd.ms-pki.certstore.stlapplication/vnd.ms-pki.stl.stmtext/html.styapplication/x-sty.svgtext/xml.swfapplication/x-shockwave-flash.tdfapplication/x-tdf.tg4application/x-tg4.tgaapplication/x-tga.tifimage/tiff.tifapplication/x-tif.tiffimage/tiff.tldtext/xml.topdrawing/x-top.torrentapplication/x-bittorrent.tsdtext/xml.txttext/plain.uinapplication/x-icq.ulstext/iuls.vcftext/x-vcard.vdaapplication/x-vda.vdxapplication/vnd.visio.vmltext/xml.vpgapplication/x-vpeg005.vsdapplication/vnd.visio.vsdapplication/x-vsd.vssapplication/vnd.visio.vstapplication/vnd.visio.vstapplication/x-vst.vswapplication/vnd.visio.vsxapplication/vnd.visio.vtxapplication/vnd.visio.vxmltext/xml.wavaudio/wav.waxaudio/x-ms-wax.wb1application/x-wb1.wb2application/x-wb2.wb3application/x-wb3.wbmpimage/vnd.wap.wbmp.wizapplication/msword.wk3application/x-wk3.wk4application/x-wk4.wkqapplication/x-wkq.wksapplication/x-wks.wmvideo/x-ms-wm.wmaaudio/x-ms-wma.wmdapplication/x-ms-wmd.wmfapplication/x-wmf.wmltext/vnd.wap.wml.wmvvideo/x-ms-wmv.wmxvideo/x-ms-wmx.wmzapplication/x-ms-wmz.wp6application/x-wp6.wpdapplication/x-wpd.wpgapplication/x-wpg.wplapplication/vnd.ms-wpl.wq1application/x-wq1.wr1application/x-wr1.wriapplication/x-wri.wrkapplication/x-wrk.wsapplication/x-ws.ws2application/x-ws.wsctext/scriptlet.wsdltext/xml.wvxvideo/x-ms-wvx.xdpapplication/vnd.adobe.xdp.xdrtext/xml.xfdapplication/vnd.adobe.xfd.xfdfapplication/vnd.adobe.xfdf.xhtmltext/html.xlsapplication/vnd.ms-excel.xlsapplication/x-xls.xlwapplication/x-xlw.xmltext/xml.xplaudio/scpls.xqtext/xml.xqltext/xml.xquerytext/xml.xsdtext/xml.xsltext/xml.xslttext/xml.xwdapplication/x-xwd.x_bapplication/x-x_b.sisapplication/vnd.symbian.install.sisxapplication/vnd.symbian.install.x_tapplication/x-x_t.ipaapplication/vnd.iphone.apkapplication/vnd.android.package-archive.xapapplication/x-silverlight-app

(0)

相关推荐

  • Nginx优化服务之网页压缩的实现方法

    配置网页压缩,节省资源1,首先我们先修改配置1234567891011121314vim /usr/local/nginx/conf/nginx.confhttp {......gzip on;    ...

  • 接入WxPusher微信推送服务出现错误:Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

    背景 使用WxPusher微信推送服务 ,可以及时的将服务的一些运行异常信息,发送到自己的微信上,方便了解服务的运行状态(PS:这个服务是免费的). 你可以在这里看到WxPusher微信推送服务的接入 ...

  • 卡罗拉性能版曝光手动四驱比思域Type(新车比三厢版本那是帅多了)

    (新车比三厢版本那是帅多了) https://dcd.zjbyte.cn/i6959477405459268103/?=&aid=36&app_name=automobile& ...

  • 简洁高效,USB Type

    创作立场声明:欢迎理性观点交流碰撞. 近年具备全功能USB Type-c或雷电接口的笔记本电脑.迷你主机等设备越来越多.具备全功能USB Type-c接口的笔电,白天拔掉一根线就可以带笔记本电脑外出, ...

  • 内外兼修才是真,公牛Type

    ​前言 转眼就到了2017年下半年,我相信关注科技圈的小伙伴应该对Type-C已经不陌生了吧?我身边很多玩机的小伙伴认为,安卓手机如果不用上Type-C就是落后的表现.其实事实也确实如此,不论是国产机 ...

  • ​{''title'':''如何计算两列数字之和?'',''content'':''

    \n 今天介绍一下,最简单的sum函数功效.下面是小编为大家精心整理的关于如何计算两列数字之和?希望能够帮助到你们. \n \n 方法/步骤 \n \n 1单列之和---菜单法 \n \n 点击开始& ...

  • Type C线材自动化处理设备厂商发布

    随着USB/type c 接口的普及和广泛应用以及自动化设备生产改善生产模式,USB/Type c生产制造过程的高效降本成为产品生产中至为关键的一个节点,特别由于其高频测试的要求,对于原有的生产过程必 ...

  • 聊聊TYPE C数据线的铜丝规格怎么选择

    自从TYPE C数据线开始跑3A,5A电流以后,铜丝规格如何选择来满足电流和功率的问题就开始经常有人问到,今天我们就一起聊聊TYPE C数据线的铜丝规格怎么选择,USB数据线,最基本的电器参数就是电阻 ...

  • 拆解报告:USB TYPE C连接器拆解及定义

    USB TYPE C接口以其纤薄.正反可插拔等诸多优势,得到了广泛运用,市场TYPE C连接器的品质也是鱼龙混杂,为了给大家做连接器的知识普及,近日我们走访业界USB TYPE C品牌连接器生产商:东 ...

  • Type C拓展坞电路基础

    Type C拓展坞在过去两年横扫线缆行业,各种厂商纷纷转产Type C拓展坞,貌似很简单,买个现成的PCBA方案,设计个炫酷的外观,买几个测试的品牌显示器就可以横空出世爆款,其实今天我们要说的是,Ty ...

  • 为什么要买带TID的Type C连接器

    鉴于线缆与连接器会因为高频讯号.机械特性.电气性能以及环境变化等因素影响其性能,因此生产商需一套完整的测试认证计划与专业实验室的协助与咨询,才能确保产品符合质量条件.完美展现功能需求:认证机构也会对电 ...