In Apache if I make a request that contains multiple Link
headers, it will merge them into one comma separated list.
In nginx, if I make the same request all but the last are discarded
For example, with the following request:
PUT https://example.org HTTP/1.1
Link: </some/path>; rel="parent"
Link: </another/path>; rel="child"
Using Apache, the PHP $_SERVER['HTTP_LINK']
variable will contain the following:
</some/path>; rel="parent", </another/path>; rel="child"
However in nginx, the variable will be:
</another/path>; rel="child"
Is there a feature toggle in nginx config I can turn on to mimic Apache's behaviour?
UPDATE:
I should add that I am using PHP-FPM as a fastcgi_pass. I added the following to the nginx config which passes the first Link
header instead of the last:
fastcgi_param HTTP_LINK $http_link;
I wonder if there's any way to access $http_link
as an array and split it myself in the config file.