Ø  前言

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. NOIP2013华容道(BFS+乱搞)

    n<=30 * m<=30 的地图上,0表示墙壁,1表示可以放箱子的空地.q<=500次询问,每次问:当空地上唯一没有放箱子的空格子在(ex,ey)时,把位于(sx,sy)的箱子移动 ...

  2. 8、16、32-BIT系列单片机区别与特点

    一.8位单片机 8031/8051/8751是Intel公司早期的产品 1.8031的特点 8031片内不带程序存储器ROM,使用时用户需外接程序存储器和一片逻辑电路373,外接的程序存储器多为EPR ...

  3. Java复习总结——详细理解Java反射机制

    反射是什么 反射的作用用一句简单的话来讲就是可以对代码进行操作的代码,这个特性经常在被用于创建JavaBean中,通常造轮子的人会用到这个特性,而应用程序员用到这个特性的场景则较少. 能够分析类能力的 ...

  4. 2018 ICPC 焦作网络赛 E.Jiu Yuan Wants to Eat

    题意:四个操作,区间加,区间每个数乘,区间的数变成 2^64-1-x,求区间和. 题解:2^64-1-x=(2^64-1)-x 因为模数为2^64,-x%2^64=-1*x%2^64 由负数取模的性质 ...

  5. poj 3666 Making the Grade(离散化+dp)

    Description A straight dirt road connects two fields on FJ's farm, but it changes elevation more tha ...

  6. JetBrains全家桶破解思路(最新更新:2019-04-17)

    JetBrains全家桶破解思路(以DataGrip为例) 2019-04-17 add new key 2019-01-24 add new key and code 2018-12-24 add ...

  7. 用lemon测交互题

    题目类型:传统. 答案比较类型:逐行比较类型(忽略多余空格和制表符). 配置:交互. 编译器参数: -o %s %s.* ..\..\data\%s\judge.cpp -Wl,--stack= ju ...

  8. easyUI 两个grid表格数据左移右移代码

    做项目中经常遇到选择已有数据,移动到选择好数据grid的场景,比如为项目添加员工,左侧grid是待选择员工,选好后移动到右侧grid,这里我用的jquery-easyui-1.4.2,整理出一份gri ...

  9. 2018 ACM 网络选拔赛 青岛赛区

    一些题目的代码被网站吞了…… Problem B. Red Black Tree http://acm.zju.edu.cn/onlinejudge/searchProblem.do?contestI ...

  10. Mac上在终端上解压与压缩

    1.安装rar 1.brew install unrar 2.unrar -version 3.进入需要解压的文件目录下,unrar x 文件夹名.rar 1.tar -xvf [file.tar.g ...