gpt4 book ai didi

HTTP内容编码,base64

转载 作者:可可西里 更新时间:2023-11-01 15:17:26 24 4
gpt4 key购买 nike

有什么方法可以知道 HTTP 响应的消息正文是否使用 Base64 编码?

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

那么,哪个 HTTP header 表明内容是用 Base64 编码的?我认为 Content-encoding 仅用于压缩。

最佳答案

据我了解,HTTP 正文可能未使用 Base64 编码:

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 编码的数据,但这应该是双方(客户端和服务器)都同意的,而且似乎没有 header 来描述这种行为。

关于HTTP内容编码,base64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13265902/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com