As http header can't be empty, check length before
setting lastModified and etag to the cacheResult. Fix http://b/issue?id=2531047
This commit is contained in:
@@ -733,11 +733,15 @@ public final class CacheManager {
|
||||
ret.contentdisposition = contentDisposition;
|
||||
}
|
||||
|
||||
// lastModified and etag may be set back to http header. So they can't
|
||||
// be empty string.
|
||||
String lastModified = headers.getLastModified();
|
||||
if (lastModified != null) ret.lastModified = lastModified;
|
||||
if (lastModified != null && lastModified.length() > 0) {
|
||||
ret.lastModified = lastModified;
|
||||
}
|
||||
|
||||
String etag = headers.getEtag();
|
||||
if (etag != null) ret.etag = etag;
|
||||
if (etag != null && etag.length() > 0) ret.etag = etag;
|
||||
|
||||
String cacheControl = headers.getCacheControl();
|
||||
if (cacheControl != null) {
|
||||
|
||||
Reference in New Issue
Block a user