Are multiple Cookie headers allowed in an HTTP request?

前端 未结 2 1947
逝去的感伤
逝去的感伤 2020-12-07 14:35

Usually, a browser groups cookies into a single Cookie header, such as:

Cookie: a=1; b=2

Does the standard allow to send these

2条回答
  •  温柔的废话
    2020-12-07 14:55

    Chanced upon this page while looking for details on the topic. A quote from HTTP State Management Mechanism, RFC 6265 ought to make things clearer:

    5.4. The Cookie Header

    When the user agent generates an HTTP request, the user agent MUST NOT attach more than one Cookie header field.

    It looks like the use of multiple Cookie headers is, in fact, prohibited!

提交回复
热议问题