Ø  前言

1.   下面是 HTTP 响应类型 ContentType 的可选值,有备无患先保存一下。摘自:https://wiki.selfhtml.org/wiki/MIME-Type/%C3%9Cbersicht

2.   以 C# 为例设置如下:

1)   ASP.NET: HttpContext.Current.Response.contentType = "application/vnd.ms-excel";

2)   WEB API: httpResponseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("text/comma-separated-values");

Ø  表格如下:

MIME-Typ

Dateiendung(en)

Bedeutung

A[Bearbeiten]

application/acad

*.dwg

AutoCAD-Dateien (nach NCSA)

application/applefile

 

AppleFile-Dateien

application/astound

*.asd *.asn

Astound-Dateien

application/dsptype

*.tsp

TSP-Dateien

application/dxf

*.dxf

AutoCAD-Dateien (nach CERN)

application/futuresplash

*.spl

Flash Futuresplash-Dateien

application/gzip

*.gz

GNU Zip-Dateien

application/javascript

*.js

serverseitige JavaScript-Dateien

application/json

*.json

enthält einen String in JavaScript-Objekt-Notation

application/listenup

*.ptlk

Listenup-Dateien

application/mac-binhex40

*.hqx

Macintosh Binärdateien

application/mbedlet

*.mbd

Mbedlet-Dateien

application/mif

*.mif

FrameMaker Interchange Format Dateien

application/msexcel

*.xls *.xla

Microsoft Excel Dateien

application/mshelp

*.hlp *.chm

Microsoft Windows Hilfe Dateien

application/mspowerpoint

*.ppt *.ppz *.pps *.pot

Microsoft Powerpoint Dateien

application/msword

*.doc *.dot

Microsoft Word Dateien

application/octet-stream

*.bin *.exe *.com *.dll *.class

Nicht näher spezifizierte Daten, z.B. ausführbare Dateien

application/oda

*.oda

Oda-Dateien

application/pdf

*.pdf

PDF-Dateien

application/postscript

*.ai *.eps *.ps

PostScript-Dateien

application/rtc

*.rtc

RTC-Dateien

application/rtf

*.rtf

RTF-Dateien

application/studiom

*.smp

Studiom-Dateien

application/toolbook

*.tbk

Toolbook-Dateien

application/vocaltec-media-desc

*.vmd

Vocaltec Mediadesc-Dateien

application/vocaltec-media-file

*.vmf

Vocaltec Media-Dateien

application/

*.xlsx

Excel (OpenOffice Calc)

vnd.openxmlformats-officedocument. spreadsheetml.sheet

application/

*.docx

Word (OpenOffice Writer)

vnd.openxmlformats-officedocument.wordprocessingml.document

application/xhtml+xml

*.htm *.html *.shtml *.xhtml

XHTML-Dateien

application/xml

*.xml

XML-Dateien

application/x-bcpio

*.bcpio

BCPIO-Dateien

application/x-compress

*.z

zlib-komprimierte Dateien

application/x-cpio

*.cpio

CPIO-Dateien

application/x-csh

*.csh

C-Shellscript-Dateien

application/x-director

*.dcr *.dir *.dxr

Macromedia Director-Dateien

application/x-dvi

*.dvi

DVI-Dateien

application/x-envoy

*.evy

Envoy-Dateien

application/x-gtar

*.gtar

GNU tar-Archivdateien

application/x-hdf

*.hdf

HDF-Dateien

application/x-httpd-php

*.php *.phtml

PHP-Dateien

application/x-latex

*.latex

LaTeX-Quelldateien

application/x-macbinary

*.bin

Macintosh Binärdateien

application/x-mif

*.mif

FrameMaker Interchange Format Dateien

application/x-netcdf

*.nc *.cdf

Unidata CDF-Dateien

application/x-nschat

*.nsc

NS Chat-Dateien

application/x-sh

*.sh

Bourne Shellscript-Dateien

application/x-shar

*.shar

Shell-Archivdateien

application/x-shockwave-flash

*.swf *.cab

Flash Shockwave-Dateien

application/x-sprite

*.spr *.sprite

Sprite-Dateien

application/x-stuffit

*.sit

Stuffit-Dateien

application/x-supercard

*.sca

Supercard-Dateien

application/x-sv4cpio

*.sv4cpio

CPIO-Dateien

application/x-sv4crc

*.sv4crc

CPIO-Dateien mit CRC

application/x-tar

*.tar

tar-Archivdateien

application/x-tcl

*.tcl

TCL Scriptdateien

application/x-tex

*.tex

TeX-Dateien

application/x-texinfo

*.texinfo *.texi

Texinfo-Dateien

application/x-troff

*.t *.tr *.roff

TROFF-Dateien (Unix)

application/x-troff-man

*.man *.troff

TROFF-Dateien mit MAN-Makros (Unix)

application/x-troff-me

*.me *.troff

TROFF-Dateien mit ME-Makros (Unix)

application/x-troff-ms

*.me *.troff

TROFF-Dateien mit MS-Makros (Unix)

application/x-ustar

*.ustar

tar-Archivdateien (Posix)

application/x-wais-source

*.src

WAIS Quelldateien

application/x-www-form-urlencoded

 

HTML-Formulardaten an CGI

application/zip

*.zip

ZIP-Archivdateien

audio/basic

*.au *.snd

Sound-Dateien

audio/echospeech

*.es

Echospeed-Dateien

audio/tsplayer

*.tsi

TS-Player-Dateien

audio/voxware

*.vox

Vox-Dateien

audio/x-aiff

*.aif *.aiff *.aifc

AIFF-Sound-Dateien

audio/x-dspeeh

*.dus *.cht

Sprachdateien

audio/x-midi

*.mid *.midi

MIDI-Dateien

audio/x-mpeg

*.mp2

MPEG-Audiodateien

audio/x-pn-realaudio

*.ram *.ra

RealAudio-Dateien

audio/x-pn-realaudio-plugin

*.rpm

RealAudio-Plugin-Dateien

audio/x-qt-stream

*.stream

Quicktime-Streaming-Dateien

audio/x-wav

*.wav

WAV-Dateien

D[Bearbeiten]

drawing/x-dwf

*.dwf

Drawing-Dateien

I[Bearbeiten]

image/cis-cod

*.cod

CIS-Cod-Dateien

image/cmu-raster

*.ras

CMU-Raster-Dateien

image/fif

*.fif

FIF-Dateien

image/gif

*.gif

GIF-Dateien

image/ief

*.ief

IEF-Dateien

image/jpeg

*.jpeg *.jpg *.jpe

JPEG-Dateien

image/png

*.png

PNG-Dateien

image/tiff

*.tiff *.tif

TIFF-Dateien

image/vasa

*.mcf

Vasa-Dateien

image/vnd.wap.wbmp

*.wbmp

Bitmap-Dateien (WAP)

image/x-freehand

*.fh4 *.fh5 *.fhc

Freehand-Dateien

image/x-icon

*.ico

Icon-Dateien (z.B. Favoriten-Icons)

image/x-portable-anymap

*.pnm

PBM Anymap Dateien

image/x-portable-bitmap

*.pbm

PBM Bitmap Dateien

image/x-portable-graymap

*.pgm

PBM Graymap Dateien

image/x-portable-pixmap

*.ppm

PBM Pixmap Dateien

image/x-rgb

*.rgb

RGB-Dateien

image/x-windowdump

*.xwd

X-Windows Dump

image/x-xbitmap

*.xbm

XBM-Dateien

image/x-xpixmap

*.xpm

XPM-Dateien

M[Bearbeiten]

message/external-body

 

Nachricht mit externem Inhalt

message/http

 

HTTP-Headernachricht

message/news

 

Newsgroup-Nachricht

message/partial

 

Nachricht mit Teilinhalt

message/rfc822

 

Nachricht nach RFC (2)822

model/vrml

*.wrl

Visualisierung virtueller Welten (VRML)

multipart/alternative

 

mehrteilige Daten; jeder Teil ist eine zu den anderen gleichwertige Alternative

multipart/byteranges

 

mehrteilige Daten mit Byte-Angaben

multipart/digest

 

mehrteilige Daten / Auswahl

multipart/encrypted

 

mehrteilige Daten verschlüsselt

multipart/form-data

 

mehrteilige Daten aus HTML-Formular (z.B. File-Upload)

multipart/mixed

 

mehrteilige Daten ohne Bezug der Teile untereinander

multipart/parallel

 

mehrteilige Daten parallel

multipart/related

 

mehrteilige Daten mit Abhängigkeiten der Teile voneinander

multipart/report

 

mehrteilige Daten / Bericht

multipart/signed

 

mehrteilige Daten / bezeichnet

multipart/voice-message

 

mehrteilige Daten / Sprachnachricht

T[Bearbeiten]

text/comma-separated-values

*.csv

kommaseparierte Datendateien

text/css

*.css

CSS Stylesheet-Dateien

text/html

*.htm *.html *.shtml

HTML-Dateien

text/javascript

*.js

JavaScript-Dateien

text/plain

*.txt

reine Textdateien

text/richtext

*.rtx

Richtext-Dateien

text/rtf

*.rtf

RTF-Dateien

text/tab-separated-values

*.tsv

tabulator-separierte Datendateien

text/vnd.wap.wml

*.wml

WML-Dateien (WAP)

application/vnd.wap.wmlc

*.wmlc

WMLC-Dateien (WAP)

text/vnd.wap.wmlscript

*.wmls

WML-Scriptdateien (WAP)

application/vnd.wap.wmlscriptc

*.wmlsc

WML-Script-C-dateien (WAP)

text/xml

*.xml

XML-Dateien

text/xml-external-parsed-entity

 

extern geparste XML-Dateien

text/x-setext

*.etx

SeText-Dateien

text/x-sgml

*.sgm *.sgml

SGML-Dateien

text/x-speech

*.talk *.spc

Speech-Dateien

V[Bearbeiten]

video/mpeg

*.mpeg *.mpg *.mpe

MPEG-Videodateien

video/quicktime

*.qt *.mov

Quicktime-Dateien

video/vnd.vivo

*.viv *.vivo

Vivo-Dateien

video/x-msvideo

*.avi

Microsoft AVI-Dateien

video/x-sgi-movie

*.movie

Movie-Dateien

W[Bearbeiten]

workbook/formulaone

*.vts *.vtts

FormulaOne-Dateien

X[Bearbeiten]

x-world/x-3dmf

*.3dmf *.3dm *.qd3d *.qd3

3DMF-Dateien

x-world/x-vrml

*.wrl

Visualisierung virtueller Welten (VRML) (veralteter MIME-Typ, aktuell ist model/vrml)

HTTP 响应类型 ContentType 对照表的更多相关文章

  1. Spring boot返回JSON类型响应及Content-Type设置

    一.背景 服务器软件用Spring boot开发,API调用的响应消息格式为JSON. 对端调用接口后无法解析响应. 抓包看Response的Body部分确实是正确的JSON格式字符串. 二.问题分析 ...

  2. 我的Android进阶之旅------>HTTP Content-type 对照表

    HTTP Content-type 对照表 文件扩展名 Content-Type(Mime-Type) 文件扩展名 Content-Type(Mime-Type) .*( 二进制流, 不知道下载文件类 ...

  3. Django的视图响应类型

    Django的视图响应类型 一. 视图函数编写原则 视图函数接受HTTP请求并返回响应,可以放在任何地方,可以是任何功能:视图函数可以返回Web文本,页面.重定向.错误.图片等任何内容:视图函数通过H ...

  4. springmvc全局异常处理ControllerAdvice区分返回响应类型是页面还是JSON

    思路: 加一个拦截器,在preHandler中取得HandlerMethod,判断其方法的返回类型,以及方法的注解和类的注解. 如果返回是json,收到异常则返回默认的异常包装类型. 如果返回是页面, ...

  5. 服务器响应HTTP的类型ContentType大全

    ".*"="application/octet-stream" ".001"="application/x-001" & ...

  6. Fiddler中session的请求/响应类型与图标对照表

  7. 【抓包工具之Fiddler】中session的请求/响应类型与图标对照表

  8. Content-type 对照表

    Content-Type,内容类型,一般是指网页中存在的Content-Type,用于定义网络文件的类型和网页的编码,决定浏览器将以什么形式.什么编码读取这个文件,比如用PHP输出图片文件.JSON数 ...

  9. HTTP Content-type 对照表

    Application Type 文件扩展名 Content-Type(Mime-Type) 描述 . application/x-   .* application/octet-stream 二进制 ...

随机推荐

  1. [luogu3391][bzoj3223]文艺平衡树【splay】

    题目描述 您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:翻转一个区间,例如原有序序列是5 4 3 2 1,翻转区间是[2,4]的话,结果是5 2 3 4 1 分析 ...

  2. 【dfs】p1731 生日蛋糕

    1441:[例题2]生日蛋搞 [题目描述] 7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体.设从下往上数第i(1≤i≤M)层蛋糕是半径为Ri, 高 ...

  3. 老铁,告别postman,用pycharm来调接口,顺便把接口脚本也写了

    最近,一位同事在用postman调涉及到依赖的接口的时候 postman设置了环境变量,但是老是获取不到依赖接口返回的值,至于的啥原因呢,@#¥%……&*()! 其实,用pycharm一样可以 ...

  4. bzoj3756pty的字符串(后缀自动机+计数)

    题目描述 题解 我们可以先对trie树建出广义SAM,然后维护一下right集合大小(注意right集合在广义SAM上的维护方式). 然后把匹配穿往广义SAM上匹配,假设现在匹配到了x节点,那么x的所 ...

  5. CF1137C Museums Tour(Tarjan,强连通分量)

    好题,神题. 题目链接:CF原网 洛谷 题目大意: 一个国家有 $n$ 个城市,$m$ 条有向道路组成.在这个国家一个星期有 $d$ 天,每个城市有一个博物馆. 有个旅行团在城市 $1$ 出发,当天是 ...

  6. 万物互联之~RPC专栏

    3.RPC引入 上篇回顾:万物互联之~深入篇 Code:https://github.com/lotapp/BaseCode/tree/master/python/6.net/6.rpc/ 其他专栏最 ...

  7. POJ--3614 Sunscreen(贪心)

    题目 3614 Sunscreen 2500*2500直接排序暴力贪心 #include<iostream> #include<cstring> #include<alg ...

  8. request.getRequestDispatcher 页面跳转,样式丢失。

    在页面中引用样式和其它资源的时候,尽量不要用相对路径,因为"当前路径"这个概念在J2EE中是不稳定的. 所以最好都是绝对路径,类似于: <% String cp = requ ...

  9. luoguP4707 重返现世

    收集邮票加强版,每个邮票不是等概率获得的了. 而且是获得K个,如果把一个全集S集合找出其获得时间集合(显然获得时间两两不同)的话,那么就是第n-k+1大的期望! %%%Sooke min-max容斥扩 ...

  10. eclipse安装activiti 工作流插件

    记录一下下eclipse集成activiti插件的过程. eclipse的版本信息为:Version: Mars.1 Release 1 (4.5.1) 下面就开始介绍下如何安装activiti插件. ...