gpt4 book ai didi

http - 是否存在可以多次出现的 HTTP header ?

转载 作者:可可西里 更新时间:2023-11-01 17:02:31 29 4
gpt4 key购买 nike

当我在维基百科 (http://en.wikipedia.org/wiki/HTTP_header) 上查看请求和响应的标准 HTTP header 列表时,大多数 header 仅在请求或响应中出现一次时才合理。

大多数。不是全部。特别是请求中的 Cookie 和响应中的 Set-Cookie 当我们处理多个由服务器设置或由服务器传回的 cookie 时,可能会出现多次客户。

当服务器要设置多个cookie时,每个cookie都有一个Set-Cookie头。客户端然后为每个 cookie 提供一个 Cookie header 。

除了 cookie:是否有其他 HTTP header 可以多次出现(在有效的 HTTP 请求中)?

最佳答案

https://www.rfc-editor.org/rfc/rfc2616#section-4.2

Multiple message-header fields with the same field-name MAY bepresent in a message if and only if the entire field-value for thatheader field is defined as a comma-separated list [i.e., #(values)].

关于http - 是否存在可以多次出现的 HTTP header ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19222369/

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