是否有“默认"设置? MIME类型? [英] Is there a "default" MIME type?

查看:114
本文介绍了是否有“默认"设置? MIME类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么可以被视为默认"模仿类型?

Is there what could be considered a "default" mimetype?

我看过未知/未知"和应用程序/二进制".但是,如果找不到其他MIME类型,是否可以将默认值恢复为默认值?

I've seen "unknown/unknown" and "application/binary". But is there a default to revert to when no other MIME type is found?

推荐答案

最不正式的MIME类型是application/octet-stream.没有任何其他信息,它说:这是一堆字节,希望您端有一个应用程序,它知道如何处理它们".有时会有一个文件名可以帮助向接收者传达如何处理数据.

The least specific official MIME type is application/octet-stream. Without any additional information, it says "here is a bunch of bytes, hopefully there is an application over on your end which knows what to do with them". Sometimes there is a file name which helps convey to the recipient what to do with the data.

未知"实际上并没有添加任何内容,只是混淆了不支持随机非官方MIME类型的客户端.同上application/binary;这只是重申八位字节流"的非标准方法.

"unknown" doesn't really add anything over this, except to confuse clients who don't support random unofficial MIME types. Ditto for application/binary; it's just a non-standard way of restating "octet-stream".

这是对的回答:如果找不到能够充分描述我的数据的现有内容类型,我可以在Content-Type:标头中添加什么?" 这就是我对此的解释问题.建议的未知的文件类型MIME?有一个冗长的答案,其中讨论了如果我没有在HTTP上下文中专门放置有效的Content-Type:标头,我的数据就会被解释?" 答案是特定于协议的(例如,在电子邮件中,不包含此标头的MIME正文部分的默认默示Content-Type:text/plain; charset="us-ascii").

This is the answer to "What can I put in the Content-Type: header if I can't find an existing content type which adequately describes my data?" which is how I have interpreted this question. The proposed duplicate Unknown file type MIME? has a lengthy answer which discusses "How is my data interpreted if I don't put a valid Content-Type: header?" specifically in an HTTP context; the answer to that is protocol-specific (in email, for example, the default implied Content-Type: for MIME body parts which do not contain this header is text/plain; charset="us-ascii").

这篇关于是否有“默认"设置? MIME类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆