DEV: Fix syntax for Link entity header for experimental_preconnect_link_header (#26218)

Per https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link, the
syntax for multiple links is something like

```
Link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect"
```

There should be no trailing `;` before the `,`.
This commit is contained in:
Alan Guo Xiang Tan
2024-03-18 19:49:16 +08:00
committed by GitHub
parent 85bf6c6833
commit 27b0ebff4c
2 changed files with 4 additions and 4 deletions

View File

@ -1200,7 +1200,7 @@ RSpec.describe ApplicationController do
expect(response.status).to eq(200)
expect(response.headers["Link"]).to include(
"<https://cdn.example.com>; rel=preconnect;, <https://cdn.example.com>; rel=dns-prefetch;",
"<https://cdn.example.com>; rel=preconnect, <https://cdn.example.com>; rel=dns-prefetch",
)
end
@ -1212,7 +1212,7 @@ RSpec.describe ApplicationController do
expect(response.status).to eq(200)
expect(response.headers["Link"]).to include(
"<https://s3.some-cdn.com>; rel=preconnect;, <https://s3.some-cdn.com>; rel=dns-prefetch;",
"<https://s3.some-cdn.com>; rel=preconnect, <https://s3.some-cdn.com>; rel=dns-prefetch",
)
end
end