Polishing
This commit is contained in:
@@ -172,7 +172,7 @@ class DefaultEntityResponseBuilder<T> implements EntityResponse.Builder<T> {
|
||||
public EntityResponse.Builder<T> cacheControl(CacheControl cacheControl) {
|
||||
String ccValue = cacheControl.getHeaderValue();
|
||||
if (ccValue != null) {
|
||||
this.headers.setCacheControl(cacheControl.getHeaderValue());
|
||||
this.headers.setCacheControl(ccValue);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class DefaultServerResponseBuilder implements ServerResponse.BodyBuilder {
|
||||
public ServerResponse.BodyBuilder cacheControl(CacheControl cacheControl) {
|
||||
String ccValue = cacheControl.getHeaderValue();
|
||||
if (ccValue != null) {
|
||||
this.headers.setCacheControl(cacheControl.getHeaderValue());
|
||||
this.headers.setCacheControl(ccValue);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -283,9 +283,9 @@ public class ResourceWebHandler implements WebHandler, InitializingBean {
|
||||
|
||||
// Apply cache settings, if any
|
||||
if (getCacheControl() != null) {
|
||||
String value = getCacheControl().getHeaderValue();
|
||||
if (value != null) {
|
||||
exchange.getResponse().getHeaders().setCacheControl(value);
|
||||
String ccValue = getCacheControl().getHeaderValue();
|
||||
if (ccValue != null) {
|
||||
exchange.getResponse().getHeaders().setCacheControl(ccValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user