@ -289,9 +286,9 @@ function OPDSBrowser:fetchFeed(item_url, headers_only)
end
localtext,icon
if code ==301then
ifheaders andcode ==301then
text=T(_("The catalog has been permanently moved. Please update catalog URL to '%1'."),BD.url(headers.location))
elseif code ==302
elseifheaders andcode ==302
anditem_url:match("^https")
andheaders.location:match("^http[^s]")then
text=T(_("Insecure HTTPS → HTTP downgrade attempted by redirect from:\n\n'%1'\n\nto\n\n'%2'.\n\nPlease inform the server administrator that many clients disallow this because it could be a downgrade attack."),
@ -304,7 +301,7 @@ function OPDSBrowser:fetchFeed(item_url, headers_only)
["404"]=_("Catalog not found."),
["406"]=_("Cannot get catalog. Server refuses to serve uncompressed content."),
}
text= error_message[tostring(code)]orT(_("Cannot get catalog. Server response status: %1."),statusorcode)
text=code anderror_message[tostring(code)]orT(_("Cannot get catalog. Server response status: %1."),statusorcode)
end
UIManager:show(InfoMessage:new{
text=text,
@ -315,21 +312,22 @@ end
-- Parses feed to catalog
functionOPDSBrowser:parseFeed(item_url)
localfeed_last_modified=self:fetchFeed(item_url,true)-- headers only