Project

General

Profile

Fehler #81

JSON response content type

Added by Cyprian Śniegota about 6 years ago. Updated almost 6 years ago.

Status:
Neu
Priority:
Normal
Category:
Bug
Target version:
eXtplorer Version:
2.1.4
Joomla! Version:
Joomla! 3.1

Description

I think that JSON response should allways be application/x-javascript. For example action=upload is not.
Why?
Some hosting companies adds extra content with javascript statistics code when response content-type is text/html, so JSON response could not be properly parsed and error occured.
My quickfix:
--- a/admin.extplorer.php
++ b/admin.extplorer.php
@ -110,6 +110,7 @ if( file_exists( EXT_PATH . '/include/'. strtolower(basename( $action )) .'.php
}
$classname = 'ext
'.$action;
if( class_exists(strtolower($classname)) && is_callable(array($classname,'execaction'))) {
header("Content-Type: application/x-javascript");
$handler = new $classname();
$handler->execAction( $dir, $item );
} else {

Joomla! 1.5.19
PHP 5.2.17

History

#1 Updated by Cyprian Śniegota about 6 years ago

extplorer 2.1.0 (stable)

Also available in: Atom PDF