- 浏览: 2105721 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
无心流泪wan:
private static final Log log = ...
log4j Category.callAppenders Block -
yjxa901:
博主好: http://www.java.net/down ...
jdk debug -
aptech406328627:
大神,请接收我的膜拜吧,纠结了两天的问题,就这么让你给解决了 ...
java.lang.reflect.MalformedParameterizedTypeException -
xukunddp:
谢谢1楼,我也遇到,搞定了
java.lang.reflect.MalformedParameterizedTypeException -
di1984HIT:
学习了!!!!
jvmstat hsperfdata java.io.tmpdir
需要处理文件上传下载,其中涉及不同的文件类型,故找了些资料来学习下,
首先给出http中 常见的MIME-TYPE 转自:http://de.selfhtml.org/diverses/mimetypen.htm
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/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 |
Ausführbare Dateien |
application/oda |
*.oda |
Oda-Dateien |
application/pdf |
*.pdf |
Adobe PDF-Dateien |
application/postscript |
*.ai *.eps *.ps |
Adobe PostScript-Dateien |
application/rtc |
*.rtc |
RTC-Dateien |
application/rtf |
*.rtf |
Microsoft 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/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-javascript |
*.js |
serverseitige JavaScript-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-Dateien |
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 |
drawing/x-dwf |
*.dwf |
Drawing-Dateien |
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 |
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 2822 |
model/vrml |
*.wrl |
Visualisierung virtueller Welten (VRML) |
multipart/alternative |
|
mehrteilige Daten gemischt |
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 gemischt |
multipart/parallel |
|
mehrteilige Daten parallel |
multipart/related |
|
mehrteilige Daten / verbunden |
multipart/report |
|
mehrteilige Daten / Bericht |
multipart/signed |
|
mehrteilige Daten / bezeichnet |
multipart/voice-message |
|
mehrteilige Daten / Sprachnachricht |
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 |
Microsoft 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 |
video/mpeg |
*.mpeg *.mpg *.mpe |
MPEG-Dateien |
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 |
workbook/formulaone |
*.vts *.vtts |
FormulaOne-Dateien |
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 ) |
其次是iana 官方的MIME 分类 http://www.iana.org/assignments/media-types/index.html
MIME Media Types
The following is the list of Directories of Content Types and Subtypes:
最后是一份类型反查表,这里只给出链接
http://www.webmaster-toolkit.com/mime-types.shtml
对于MIME TYPE一般还会有扩展处理参数配合使用,例如 Content-Disposition
针对Content-Disposition的文档主要有 http://www.ietf.org/rfc/rfc1806.txt
摘录出BNF
In the extended BNF notation of [RFC 822], the Content-Disposition header field is defined as follows: disposition := "Content-Disposition" ":" disposition-type *(";" disposition-parm) disposition-type := "inline" / "attachment" / extension-token ; values are not case-sensitive disposition-parm := filename-parm / parameter filename-parm := "filename" "=" value;
最后附上http1.1 rfc文档
http://www.ietf.org/rfc/rfc2616.txt
发表评论
-
QoS技术介绍
2012-11-07 13:24 1017看到一篇讲述QOS很好的文档记录下。 Qo ... -
CPU C-states
2012-08-19 22:47 39241:ACPI http://en.wikipedia. ... -
Epigrams on Programming
2012-03-25 00:11 873转载自:http://www-pu.informatik.un ... -
Data Encryption Algorithm (DEA) Comparison(转)
2012-02-14 15:57 1091突然被同事问到选择什么加密算法合适,虽然结果是答对了,但是还是 ... -
Boot Loader 相关资料
2011-12-30 22:13 903嵌入式系统 Boot Loader 技术内幕 http ... -
Unicode chars
2011-12-12 13:51 1014找到一个unicode 的总的字符集 ,记录下 ... -
Description of the hard disk cache
2011-12-09 16:51 1205转自:http://smallvoid.com/article ... -
Native Command Queuing
2011-10-17 13:45 1046硬盘的Command Queuing 1:wiki ... -
Interrupt table
2011-07-16 18:46 1131摘录自:http://en.wikipedia.org/wik ... -
Multi-Core Processor Architecture Explained
2011-06-19 12:13 1034Multi-Core Processor Architectu ... -
Numbers everyone should know
2011-04-09 14:41 1495以前看过然后没记录下来,这次再找出来记录下。 转载自: ... -
List of HTTP status codes
2009-11-04 19:16 1885转载自:http://en.wikipedia.org/wik ... -
Programmer Competency Matrix
2009-10-04 10:42 1055转载自:http://www.starling-softwar ...
相关推荐
MIME使用Internet Assigned Numbers Authority (IANA)作为中心的注册机制来管理Content-Type头域的值,以确保这些值在一个有序而且公开的状态下开发。 在Web开发中,Content-Type头域非常重要,因为它决定了浏览器...
例如,PNG图像的前8字节是"\x89PNG\r\n\x1A\n",这可以用来识别PNG文件的MimeType。 4. 使用库或API:在编程环境中,可以使用各种库或API来检测文件的MimeType。例如,在Python中,我们可以使用`mimetypes`库,或者...
此处为部分数据...\r\n--WebKitFormBoundary7MA4YWxkTrZu0gW--' boundary = '--WebKitFormBoundary7MA4YWxkTrZu0gW' parsed_data = parse_multipart_data(data, boundary) for filename, content in parsed_data: ...
- **Content-Type**:指定页面的 MIME 类型和字符集编码。 - **Expires**:设置页面的过期时间。 - **Pragma**:指示浏览器是否应该缓存页面。 - **Cache-Control**:控制页面的缓存行为。 - **Refresh**:设定页面...
在开发Web应用时,我们经常会遇到“Refused to apply style from ‘URL’ because its MIME type is not a supported stylesheet MIME type”的错误,这个问题通常涉及到CSS样式表的加载问题。在这个具体的案例中,...
- `T=mime-type`: 设置 MIME 类型。 **20. **Rewrite Cond Flags**:** 控制条件语句的行为: - `NC`: 不区分大小写。 - `OR`: 使用逻辑“或”连接条件。 **21. **Redirection Header Codes**:** 定义重定向...
这里的`file_list`是一个包含待修改文件路径的列表,`'svn:mime-type'`是需要设置的属性名称,`'text/plain'`是属性值。 总的来说,`pysvn`库为Python开发者提供了一种方便的方式来自动化处理SVN操作,无论是日常的...
fpm -s dir -t rpm -n nginx -v 1.6.3 -d 'pcre-devel,openssl-devel' --post-install /server/scripts/nginx_rpm.sh -f /application/nginx-1.6.3/ 检查 rpm -qpl nginx-1.6.3-1.x86_64.rpm [root@nginx tools]...
dataOutput.writeBytes("\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\n"); dataOutput.writeBytes("Content-Disposition: form-data; name=\"" + name + "\"; filename=\"" + fileName + "\"\r\n"); ...
+ [enterprise] added property "MimeType" for each output format in server configuration + [enterprise] added property "BrowserPrint" in server configuration - allow printing by browser, added new ...
sb.Append("Content-Type:image/gif\n"); sb.Append("Content-Transfer-Encoding:base64\n"); sb.Append(strW + "\n"); sb.Append("\n"); sb.Append("\n"); sb.Append(strBianm + "\n"); sb.Append("\n"); }...
8. **T=MIME-type**: 强制设定响应的MIME类型,例如将资源识别为特定类型的文件。 9. **NS**: 只在非内部子请求中使用,不应用于由其他规则触发的内部请求。 10. **NC**: 不区分大小写,使正则表达式匹配时不考虑...
- 设置合适的MIME类型,如`'Content-Type': 'text/css'`或`'Content-Type': 'application/javascript'`,确保浏览器正确解析文件。 - 使用HTTPS支持,提供更安全的连接。 - 错误处理,为可能出现的错误提供适当的...
http://php.net/configuration.file ; The syntax of the file is extremely simple. Whitespace and lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e...
- **Content-Type**: 数据的MIME类型。 - **Last-Modified**: 最后修改时间。 - **Expires**: 资源过期时间。 这些字段对于确保客户端和服务器之间的有效通信至关重要。例如,通过设置`Content-Type`可以告诉客户端...
Kessler web: http://groups.yahoo.com/group/sakemail/To subscribe to the mailing list of sakemail, just go tohttp://groups.yahoo.com/group/sakemail/History:0.9 - First released version0.9.1b -Fixed ...
- `-t <MIME_TYPE>`:指定MIME类型。 - `-c <CATEGORY>`:添加类别到Intent。 - `-e`或`--es <EXTRA_KEY> <EXTRA_STRING_VALUE>`:添加额外的字符串值。 - `--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>`:添加额外...
密码查询:class/querypsw.php <... <HEAD> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <TITLE>.../TITLE>... charset=gb2312n"; // Mime type $subje
例如,你可以在这里设置Struts 2的国际化地区信息、对象工厂类以及MIME-type解析器等。 2. **映射文件**:`struts.xml`是请求映射和Action配置的主要文件。它可以有多个,用于定义不同的Action类及其对应的URL映射...
- **使用标准的MIME类型**:在HTTP请求和响应中使用标准的MIME类型和字符集,如`text/html;charset=utf-8`。 - **客户端处理**:在客户端(如IE浏览器)中进行适当的设置,确保发送的请求符合预期的编码规则。 ####...