Content-Length not required on remote objects.
For some reason, CDN stopped returning content length on some objects. Making CL optional.
This commit is contained in:
@@ -132,7 +132,7 @@ class RemoteObject extends Object {
|
||||
}
|
||||
|
||||
$object->setContentType($headers['Content-Type']);
|
||||
$object->contentLength = (int) $headers['Content-Length'];
|
||||
$object->contentLength = empty($headers['Content-Length']) ? 0 : (int) $headers['Content-Length'];
|
||||
$object->etag = (string) $headers['Etag']; // ETag is now Etag.
|
||||
$object->lastModified = strtotime($headers['Last-Modified']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user