HTTP内容编码的base64 [英] HTTP content encoding, base64

查看:957
本文介绍了HTTP内容编码的base64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法知道HTTP响应的消息体带的Base64 codeD?

Is there any way to know if the message body of an HTTP response is encoded with Base64?

我了解到,内容传输编码不是HTTP头的一部分。

I learnt that content-transfer-encoding is not part of HTTP header.

所以,这HTTP标头表明内容带的Base64 codeD?我想编码内容仅用于COM pressions。

So, which HTTP header indicates that the content is encoded with Base64? I think Content-encoding is only used for compressions.

推荐答案

据我了解,一个HTTP的身体可能无法连接为Base64 codeD:

As far as I understand, an HTTP body may not be encoded in Base64:

HTTP不使用内容传送编码(CTE)场
     2045年的代理和网关的MIME兼容协议HTTP MUST
     删除所有无标识的CTE(引用可打印或的base64)编码
     之前提供的响应消息发送到HTTP客户端。

HTTP does not use the Content-Transfer-Encoding (CTE) field of RFC 2045. Proxies and gateways from MIME-compliant protocols to HTTP MUST remove any non-identity CTE ("quoted-printable" or "base64") encoding prior to delivering the response message to an HTTP client.

身份感:

默认(标识)的编码;使用否转型
          任何

The default (identity) encoding; the use of no transformation whatsoever.

当然,你被允许使用HTTP传输的Base64恩codeD数据,但这应该是双方(客户端和服务器)同意,而且似乎没有要来形容这一个头行为。

Of course you're allowed to transport Base64-encoded data using HTTP, but that should be something both parties (client and server) agree on, and there doesn't seem to be a header to describe this behavior.

这篇关于HTTP内容编码的base64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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