Let XML parser determine character encoding from header.
This commit is contained in:
1 parent
30e786e589
commit
71fe398873
1 file changed
+6
-6
+6
-6
@@ -19,11 +19,11 @@ package net.sourceforge.guacamole.net.basic;
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.sourceforge.guacamole.GuacamoleException;
|
import net.sourceforge.guacamole.GuacamoleException;
|
||||||
import net.sourceforge.guacamole.net.auth.Credentials;
|
import net.sourceforge.guacamole.net.auth.Credentials;
|
||||||
@@ -113,9 +113,9 @@ public class BasicFileAuthenticationProvider extends SimpleAuthenticationProvide
|
|||||||
parser.setContentHandler(contentHandler);
|
parser.setContentHandler(contentHandler);
|
||||||
|
|
||||||
// Read and parse file
|
// Read and parse file
|
||||||
Reader reader = new BufferedReader(new FileReader(user_mapping_file));
|
InputStream input = new BufferedInputStream(new FileInputStream(user_mapping_file));
|
||||||
parser.parse(new InputSource(reader));
|
parser.parse(new InputSource(input));
|
||||||
reader.close();
|
input.close();
|
||||||
|
|
||||||
// Store mod time and user mapping
|
// Store mod time and user mapping
|
||||||
mod_time = user_mapping_file.lastModified();
|
mod_time = user_mapping_file.lastModified();
|
||||||
|
|||||||
Reference in new issue
Block a user