if (header.isPrivate()) { appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields()));
if (header.isPrivate()) { appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields()));
if (value.getSMaxAge() > -1) addDirective("s-maxage", buffer).append("=").append(value.getSMaxAge()); if (value.getMaxAge() > -1) addDirective("max-age", buffer).append("=").append(value.getMaxAge()); if (value.isPrivate())
if (!cc.isPrivate() && !cc.isNoStore()) { MultivaluedMap<String, String> varyHeaders = new MultivaluedHashMap<>(); if (context.getHeaders().containsKey(HttpHeaders.VARY)) {
protected boolean isCacheControlValid(final ReaderInterceptorContext context, final CacheControl responseControl) { boolean valid = responseControl != null && !responseControl.isNoCache() && !responseControl.isNoStore(); if (valid) { String clientHeader = (String)context.getProperty(CacheControlClientRequestFilter.CLIENT_CACHE_CONTROL); CacheControl clientControl = clientHeader == null ? null : CacheControl.valueOf(clientHeader); if (clientControl != null && clientControl.isPrivate() != responseControl.isPrivate()) { valid = false; } } return valid; } }
protected boolean isCacheControlValid(final ReaderInterceptorContext context, final CacheControl responseControl) { boolean valid = responseControl != null && !responseControl.isNoCache() && !responseControl.isNoStore(); if (valid) { String clientHeader = (String)context.getProperty(CacheControlClientRequestFilter.CLIENT_CACHE_CONTROL); CacheControl clientControl = clientHeader == null ? null : CacheControl.valueOf(clientHeader); if (clientControl != null && clientControl.isPrivate() != responseControl.isPrivate()) { valid = false; } } return valid; } }
if (c.isPrivate()) { sb.append(PRIVATE); handleFields(c.getPrivateFields(), sb);
if (c.isPrivate()) { sb.append(PRIVATE); handleFields(c.getPrivateFields(), sb);
if (value.isPrivate()) { b.append("private"); } else {
.filter(cc -> !cc.isPrivate()) .ifPresent(cc -> { cc.setPrivate(true);
if (cacheControl.isNoTransform()) directives.add(CacheDirective.noTransform()); if (cacheControl.isPrivate()) directives.add(CacheDirective.privateInfo()); if (cacheControl.isProxyRevalidate())
public String toString(CacheControl header) { StringBuffer b = new StringBuffer(); if (header.isPrivate()) appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields())); if (header.isNoCache()) appendQuotedWithSeparator(b, "no-cache", buildListValue(header.getNoCacheFields())); if (header.isNoStore()) appendWithSeparator(b, "no-store"); if (header.isNoTransform()) appendWithSeparator(b, "no-transform"); if (header.isMustRevalidate()) appendWithSeparator(b, "must-revalidate"); if (header.isProxyRevalidate()) appendWithSeparator(b, "proxy-revalidate"); if (header.getMaxAge() != -1) appendWithSeparator(b, "max-age", header.getMaxAge()); if (header.getSMaxAge() != -1) appendWithSeparator(b, "s-maxage", header.getSMaxAge()); for (Map.Entry<String, String> e : header.getCacheExtension().entrySet()) { appendWithSeparator(b, e.getKey(), quoteIfWhitespace(e.getValue())); } return b.toString(); }
public String toString(CacheControl header) { StringBuffer b = new StringBuffer(); if (header.isPrivate()) appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields())); if (header.isNoCache()) appendQuotedWithSeparator(b, "no-cache", buildListValue(header.getNoCacheFields())); if (header.isNoStore()) appendWithSeparator(b, "no-store"); if (header.isNoTransform()) appendWithSeparator(b, "no-transform"); if (header.isMustRevalidate()) appendWithSeparator(b, "must-revalidate"); if (header.isProxyRevalidate()) appendWithSeparator(b, "proxy-revalidate"); if (header.getMaxAge() != -1) appendWithSeparator(b, "max-age", header.getMaxAge()); if (header.getSMaxAge() != -1) appendWithSeparator(b, "s-maxage", header.getSMaxAge()); for (Map.Entry<String, String> e : header.getCacheExtension().entrySet()) { appendWithSeparator(b, e.getKey(), quoteIfWhitespace(e.getValue())); } return b.toString(); }
if (header.isPrivate()) { appendDirectiveWithValues(cacheControlHeader, PRIVATE,
if (header.isPrivate()) { appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields()));
if (header.isPrivate()) { appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields()));
if (header.isPrivate()) { appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields()));
if (header.isPrivate()) { appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields()));
if (header.isPrivate()) { appendQuotedWithSeparator(b, "private", buildListValue(header.getPrivateFields()));