Commit 4314e73
authored
[StaticWebAssets] Fix Vary header in Static Web Assets compression negotiation to use Accept-Encoding (#50151)
The ApplyCompressionNegotiation task was incorrectly setting the Vary header to "Content-Encoding" when serving compressed static web assets. According to HTTP specifications, the Vary header should indicate which request headers the server considers when determining the response, not which response headers are set.
When serving compressed content, the server should set Vary: Accept-Encoding to indicate that the response varies based on the client's Accept-Encoding request header (which tells the server what compression formats the client supports).1 parent 35c6ce5 commit 4314e73
File tree
72 files changed
+6507
-6507
lines changed- src/StaticWebAssetsSdk/Tasks
- test
- Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines
- Microsoft.NET.Sdk.StaticWebAssets.Tests
- StaticWebAssetsBaselines
- StaticWebAssets
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
72 files changed
+6507
-6507
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments