+ // When the server does not provide a Content-Length header,
+ // curl_getinfo() would return a negative value for
+ // "download_content_length", however RSS recommends to use 0 when the
+ // enclosure's size cannot be determined.
+ // See: https://www.feedvalidator.org/docs/error/UseZeroForUnknown.html
+ $length = max($url_info['download_content_length'], 0);
+