Change default appcache manifest file extension

This commit changes the default file extension configured with
`AppCacheManifestTranformer`. This ResourceTransformer was previously
considering `.manifest` files by default, but this has been changed in
the official spec to `appcache`, in order not to clash with Microsoft's
unregistered application/manifest type.

Issue: SPR-14687
This commit is contained in:
Brian Clozel
2016-09-09 22:11:20 +02:00
parent 4588b6c9f4
commit 1881aa5b5b
8 changed files with 12 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ public class AppCacheManifestTransformerTests {
@Test
public void syntaxErrorInManifest() throws Exception {
Resource resource = new ClassPathResource("test/error.manifest", getClass());
Resource resource = new ClassPathResource("test/error.appcache", getClass());
given(this.chain.transform(this.request, resource)).willReturn(resource);
Resource result = this.transformer.transform(this.request, resource, this.chain);
@@ -89,7 +89,7 @@ public class AppCacheManifestTransformerTests {
transformers.add(new CssLinkResourceTransformer());
this.chain = new DefaultResourceTransformerChain(resolverChain, transformers);
Resource resource = new ClassPathResource("test/appcache.manifest", getClass());
Resource resource = new ClassPathResource("test/test.appcache", getClass());
Resource result = this.transformer.transform(this.request, resource, this.chain);
byte[] bytes = FileCopyUtils.copyToByteArray(result.getInputStream());
String content = new String(bytes, "UTF-8");