Correct typos (#2018)
This commit is contained in:
@@ -75,23 +75,23 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport {
|
||||
ResourceTransformerChain transformerChain) {
|
||||
|
||||
return transformerChain.transform(exchange, inputResource)
|
||||
.flatMap(ouptputResource -> {
|
||||
String filename = ouptputResource.getFilename();
|
||||
.flatMap(outputResource -> {
|
||||
String filename = outputResource.getFilename();
|
||||
if (!"css".equals(StringUtils.getFilenameExtension(filename)) ||
|
||||
inputResource instanceof EncodedResourceResolver.EncodedResource ||
|
||||
inputResource instanceof GzipResourceResolver.GzippedResource) {
|
||||
return Mono.just(ouptputResource);
|
||||
return Mono.just(outputResource);
|
||||
}
|
||||
|
||||
DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory();
|
||||
Flux<DataBuffer> flux = DataBufferUtils
|
||||
.read(ouptputResource, bufferFactory, StreamUtils.BUFFER_SIZE);
|
||||
.read(outputResource, bufferFactory, StreamUtils.BUFFER_SIZE);
|
||||
return DataBufferUtils.join(flux)
|
||||
.flatMap(dataBuffer -> {
|
||||
CharBuffer charBuffer = DEFAULT_CHARSET.decode(dataBuffer.asByteBuffer());
|
||||
DataBufferUtils.release(dataBuffer);
|
||||
String cssContent = charBuffer.toString();
|
||||
return transformContent(cssContent, ouptputResource, transformerChain, exchange);
|
||||
return transformContent(cssContent, outputResource, transformerChain, exchange);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -254,23 +254,23 @@ public class CrossOriginAnnotationIntegrationTests extends AbstractRequestMappin
|
||||
|
||||
@CrossOrigin
|
||||
@GetMapping(path = "/ambiguous-header", headers = "header1=a")
|
||||
public void ambigousHeader1a() {
|
||||
public void ambiguousHeader1a() {
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@GetMapping(path = "/ambiguous-header", headers = "header1=b")
|
||||
public void ambigousHeader1b() {
|
||||
public void ambiguousHeader1b() {
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@GetMapping(path = "/ambiguous-produces", produces = "application/xml")
|
||||
public String ambigousProducesXml() {
|
||||
public String ambiguousProducesXml() {
|
||||
return "<a></a>";
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@GetMapping(path = "/ambiguous-produces", produces = "application/json")
|
||||
public String ambigousProducesJson() {
|
||||
public String ambiguousProducesJson() {
|
||||
return "{}";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user