Is an HTTP client allowed to send multiple headers with the same name?

前端 未结 2 1050
被撕碎了的回忆
被撕碎了的回忆 2021-01-15 02:54

I\'m aware that HTTP servers can send headers with duplicate keys (at least Set-Cookie comes to mind), but is there a plausible reason for clients to do this?

2条回答
  •  感情败类
    2021-01-15 03:37

    a) It might be easier when multiple pieces of code are involved,

    b) It can be unavoidable for certain fields such as Set-Cookie (see https://greenbytes.de/tech/webdav/rfc7230.html#rfc.section.3.2.2.p.4).

提交回复
热议问题