Dragonfly CMS v9 ⇒ Downloads Pro ⇒ file is a website and not a valid file ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks Downloads Pro

file is a website and not a valid file Reply to topic


In Downloads Pro I get the message "(url to file) is a website and not a valid file". Looking at line 42 of /modules/Downloads/functions/mirrors.inc this error occurs when the "Content-Type" header returned by the URL contains the text "xhtml". However, in this case, I fairly sure it doesn't.

Using web-sniffer.net I put in the URL to the file I'm trying to add, and whether I choose GET or POST, or amend any of the other options, the "Content-Type" returned is "application/octet-stream". The status is "HTTP/1.1 200 OK", so I don't know why this is happening.

I could of course comment out the line that produces this error, but I'd rather not.

Any ideas?

Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Can you provide me the url so i can test?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


9 months ago, but amazingly I still have the URL on file, and it's still there ...

downloads.urban-zone.o...ns_rc1.pk3

This is a map for a game based on the Quake3 engine (hence the .pk3 extension)

Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


./modules/Downloads/functions/mirrors.inc has a bug
} else if (preg_match('#[xhtml]+$#i', $dl_info['type'])) {

try:

} else if (0 !== strpos($dl_info['type'],'application/') || strpos($dl_info['type'],'xml')) {

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Tue Jul 01, 2014 9:26 am; edited 1 time in total

All times are UTC


Jump to: