以下是一个典型的MHTML文件(;后为解释部分): Mime-Version: 1.0 ; Content-Location为主文件地址,可以随意设定 Content-Location: http: Quoted-Printable: =A9 Example of a copyright sign mapped onto HTML markup: ¨ --boundary-example ; Content-Location :该文件的地址,可以是绝对地址或相对主文件的相对地址 ;这里是绝对地址 Content-Location:http://www.ietf.cnri.reston.va.us/images/ietflogo1 --boundary-example ;这里是相对地址 Content-Location: images/ietflogo2.gif Content-Transfer-Encoding: BASE64 --boundary-example Content-Location:http://www.ietf.cnri.reston.va.us/images/ietflogo3.gif Content-Transfer-Encoding
— Content-Location头字段 Content- Location头字段用于为内嵌资源设置一个URI地址,这个URI地址可以是绝对或相对的。 例如,假设将一个表示内嵌图 片的MIME消息的Content-Location头字段设置为如下形式: Content-Location:http://www.it315.org/images/it315logo.gif http://www.it315.org/images/it315logo.gif”> — Content-Base头字段 Content- Base头字段用于为内嵌资源设置一个基准路径,只有这样,Content-Location 例如,假设将一个 表示内嵌图片的MIME消息的Content-Base和Content-Location头字段设置为如下形式: Content-Base: http://www.it315.org/images / Content-Location: it315logo.gif 那么,内嵌资源的完整路径就是Content-Base头字段设置的基准路径与Content-Location头字段设置的相对路径相加的结果
热卖云产品新年特惠,2核2G轻量应用服务器9元/月起,更多上云必备产品助力您轻松上云
Server,Set-Cookie,Trailer,Transfer-Encoding,Vary,Allow,Content-Encoding,Content-Language,Content-Length,Content-Location Server,Set-Cookie,Trailer,Transfer-Encoding,Vary,Allow,Content-Encoding,Content-Language,Content-Length,Content-Location Server,Set-Cookie,Trailer,Transfer-Encoding,Vary,Allow,Content-Encoding,Content-Language,Content-Length,Content-Location Server,Set-Cookie,Trailer,Transfer-Encoding,Vary,Allow,Content-Encoding,Content-Language,Content-Length,Content-Location Server,Set-Cookie,Trailer,Transfer-Encoding,Vary,Allow,Content-Encoding,Content-Language,Content-Length,Content-Location
Content-Encoding: gzip Content-Language 响应体的语言 Content-Language: en,zh Content-Length 响应体的长度 Content-Length: 348 Content-Location 请求资源可替代的备用的另一地址 Content-Location: /index.htm Content-MD5 返回资源的MD5校验值 Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ
7、Content-Location 当客户端请求的资源在服务器有多个地址时,服务器可以通过Content-Location字段告知客户端其它的可选地址。这个字段比较少见。
Content-Language–响应就内容所使用的语言,例: Content-Language:zh-cn Content-Length–响应消息体的长度,用8进制字节表示Content-Length:348 Content-Location –所返回的数据的一个候选位置,例: Content-Location:/index.htm Content-Type–当前内容的MIME类型,例: Content-Type:text/html;charset
Location 是与响应相关联的标头,而 Content-Location 与返回的实体相关联。 Content-Location Content-Location 可不是对应 Accept-Location,因为没有这个标头哈哈哈哈。 实际上 Content-Location 对应的是 Location。 Location 和 Content-Location 是不一样的,Location 表示重定向的 URL,而 Content-Location 表示用于访问资源的直接 URL,以后无需进行进一步的内容协商 Location 是与响应关联的标头,而 Content-Location 是与返回的数据相关联的标头,如果你不好理解,看一下下面的表格 Content-Location: /documents/foo.json
资源可支持的HTTP方法 Content-Encoding 实体主体适用的编码方式 Content-Language 实体主体的自然语言 Content-Length 实体主体的大小(单位:字节) Content-Location Location 对应的是响应,而 Content-Location 对应的是要返回的实体 Content-MD5 一串由 MD5 算法生成的值,其目的在于检查报文主体在传输过程中是否保持完整,以及确认传输到达
Content-Language 响应体的语言 Content-Language: en,zh Content-Length 响应体的长度,如果数据大小不匹配,要当作异常处理 Content-Length: 348 Content-Location 请求资源可替代的备用的另一地址 Content-Location: /index.htm Content-MD5 返回资源的MD5校验值 Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ
Content-Encoding: gzip Content-Language 响应体的语言 Content-Language: en,zh Content-Length 响应体的长度 Content-Length: 348 Content-Location 请求资源可替代的备用的另一地址 Content-Location: /index.htm Content-MD5 返回资源的MD5校验值 Content-MD5: MD5校验值 Content-Range
在mht文件中,每一个NextPart下面都会有类似下面的几行说明字段: Content-Type: image/jpeg Content-Transfer-Encoding: base64 Content-Location
该指令允许 Apache httpd 调整 HTTP 重定向响应(HTTP redirect response) Location、Content-Location 和 URI 标头中的 URL。
扫码关注腾讯云开发者
领取腾讯云代金券