projects
/
tweeper.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tweeper.php: fix validation when generating enclosure elements
[tweeper.git]
/
tweeper.php
diff --git
a/tweeper.php
b/tweeper.php
index
524928a
..
d084398
100644
(file)
--- a/
tweeper.php
+++ b/
tweeper.php
@@
-96,7
+96,11
@@
class Tweeper {
"video/ogg",
);
"video/ogg",
);
- $url_info = Tweeper::get_info($url);
+ // The RSS specification says that the enclosure element url must be http.
+ // See http://sourceforge.net/p/feedvalidator/bugs/72/
+ $http_url = preg_replace("/^https/", "http", $url);
+
+ $url_info = Tweeper::get_info($http_url);
$supported = in_array($url_info['content_type'], $supported_content_types);
if (!$supported) {
$supported = in_array($url_info['content_type'], $supported_content_types);
if (!$supported) {