implemented settable character sets

This commit is contained in:
hns 2001-05-20 13:10:48 +00:00
parent 8bbd32f01c
commit a6b45deaa8

View file

@ -77,6 +77,8 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn
protected CacheMap skincache = new CacheMap (100);
String charset;
private CryptFile pwfile;
@ -126,6 +128,8 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn
nmgr = new NodeManager (this, dbDir.getAbsolutePath (), props);
charset = props.getProperty ("charset", "ISO-8859-1");
debug = "true".equalsIgnoreCase (props.getProperty ("debug"));
try {
requestTimeout = Long.parseLong (props.getProperty ("requestTimeout", "60"))*1000l;
@ -297,7 +301,12 @@ public class Application extends UnicastRemoteObject implements IRemoteApp, Runn
if (primaryRequest) {
activeRequests.remove (req);
releaseEvaluator (ev);
res.close (); // this needs to be done before sending it back
// response needs to be closed/encoded before sending it back
try {
res.close (charset);
} catch (UnsupportedEncodingException uee) {
logEvent ("Unsupported response encoding: "+uee.getMessage());
}
} else {
res.waitForClose ();
}