简体   繁体   English

哪个 HTTP header 在服务器发送相同的 HTTP Z099FB995346F31C3549F6E40DB0 时实现不同的 EZ?

[英]Which HTTP header is implemented when server sends same HTTP header multiple times with different values?

I came across this one website made in PHP.我遇到了这个用 PHP 制作的网站。 access-control-allow-origin header is repeated thrice. access-control-allow-origin header 重复三次。 I want to know how is this response handled.我想知道这个响应是如何处理的。 Does the latter one hold more precedence than previous one or is it the other way around?后一个比前一个拥有更多优先级还是相反? Or both hold equal significance?还是两者具有同等意义?

在此处输入图像描述

In general: all of them, comma-separated.一般来说:所有这些,以逗号分隔。 See https://greenbytes.de/tech/webdav/rfc7230.html#rfc.section.3.2.2 :https://greenbytes.de/tech/webdav/rfc7230.html#rfc.section.3.2.2

A recipient MAY combine multiple header fields with the same field name into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field value to the combined field value in order, separated by a comma.接收者可以将多个具有相同字段名称的 header 字段组合成一个“字段名称:字段值”对,而不改变消息的语义,方法是将每个后续字段值按顺序附加到组合字段值上,用逗号。 The order in which header fields with the same field name are received is therefore significant to the interpretation of the combined field value;因此,接收具有相同字段名称的 header 字段的顺序对组合字段值的解释很重要; a proxy MUST NOT change the order of these field values when forwarding a message.转发消息时,代理不得更改这些字段值的顺序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM