fixed 204 response

master
subhra74 2020-05-17 12:57:58 +02:00
parent 9ba8261564
commit fe50900086
7 changed files with 22 additions and 12 deletions

View File

@ -63,7 +63,7 @@ import xdman.util.XDMUtils;
public class XDMApp implements DownloadListener, DownloadWindowListener, Comparator<String> {
public static final String GLOBAL_LOCK_FILE = ".xdm-global-lock";
public static final String APP_VERSION = "7.2.10";
public static final String APP_VERSION = "7.2.11";
public static final String XDM_WINDOW_TITLE = "XDM 2020";
public static final String APP_UPDAT_URL = "https://api.github.com/repos/subhra74/xdm/releases/latest";
public static final String APP_UPDATE_CHK_URL = "https://subhra74.github.io/xdm/update-checker.html?v=";

View File

@ -128,6 +128,7 @@ public class MonitoringSession implements Runnable {
HeaderCollection headers = new HeaderCollection();
headers.setValue("Cache-Control", "max-age=0, no-cache, must-revalidate");
res.setHeaders(headers);
Logger.log("Response set for 204");
}
private void onVideo(Request request, Response res) throws UnsupportedEncodingException {

View File

@ -31,6 +31,8 @@ public class Response {
if (body != null && body.length > 0) {
out.write(body);
}
} else {
out.write(buf.toString().getBytes());
}
out.flush();

View File

@ -32,18 +32,16 @@ public class AboutPage extends Page {
JLabel lblTitle = new JLabel(StringResource.get("FULL_NAME"));
lblTitle.setFont(FontResource.getBiggerFont());
lblTitle.setForeground(Color.WHITE);
lblTitle.setBounds(getScaledInt(15), y,
getScaledInt(350) - getScaledInt(30), h);
lblTitle.setBounds(getScaledInt(15), y, getScaledInt(350) - getScaledInt(30), h);
panel.add(lblTitle);
y += h;
y += getScaledInt(20);
String details = String.format(
"App version %s with runtime %s on %s\n\nCreated by: Subhra Das Gupta\n\n%s\nCopyright (C) 2020, All rights reserved.",
XDMApp.APP_VERSION, System.getProperty("java.version"),
System.getProperty("os.name"),
"https://github.com/subhra74/xdm");
"Version %s with Java %s on %s\n\nCreated by: Subhra Das Gupta\n\n%s\nCopyright (C) 2020, All rights reserved.",
XDMApp.APP_VERSION, (System.getProperty("java.vendor") + " " + System.getProperty("java.version")),
System.getProperty("os.name"), "https://github.com/subhra74/xdm");
h = getScaledInt(250);
JTextArea lblDetails = new JTextArea();
@ -54,8 +52,7 @@ public class AboutPage extends Page {
lblDetails.setForeground(Color.WHITE);
lblDetails.setText(details);
lblDetails.setFont(FontResource.getBigFont());
lblDetails.setBounds(getScaledInt(15), y,
getScaledInt(350) - getScaledInt(30), h);
lblDetails.setBounds(getScaledInt(15), y, getScaledInt(350) - getScaledInt(30), h);
panel.add(lblDetails);
y += h;

View File

@ -1445,7 +1445,7 @@ public class MainWindow extends XDMFrame implements ActionListener {
}
private void openTranslationPage() {
XDMUtils.browseURL("https://github.com/subhra74/xdm/translations");
XDMUtils.browseURL("https://github.com/subhra74/xdm/wiki/Submitting-translations-for-XDM");
}
private void openSupportPage() {

View File

@ -6,7 +6,8 @@ public class BrowserLauncher {
public static boolean launchFirefox(String args) {
int os = XDMUtils.detectOS();
if (os == XDMUtils.WINDOWS) {
File[] ffPaths = { new File(System.getenv("PROGRAMFILES"), "Mozilla Firefox\\firefox.exe"),
File[] ffPaths = { new File(System.getenv("ProgramW6432"), "Mozilla Firefox\\firefox.exe"),
new File(System.getenv("PROGRAMFILES"), "Mozilla Firefox\\firefox.exe"),
new File(System.getenv("PROGRAMFILES(X86)"), "Mozilla Firefox\\firefox.exe") };
for (int i = 0; i < ffPaths.length; i++) {
System.out.println(ffPaths[i]);
@ -23,7 +24,7 @@ public class BrowserLauncher {
}
}
}
if(os==XDMUtils.LINUX) {
if (os == XDMUtils.LINUX) {
File[] ffPaths = { new File("/usr/bin/firefox") };
for (int i = 0; i < ffPaths.length; i++) {
if (ffPaths[i].exists()) {

View File

@ -65,6 +65,11 @@ public class NativeMessagingHostInstaller {
return;
}
} else {
File manifestFolder = new File(os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION)
: (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION));
if (!manifestFolder.exists()) {
manifestFolder.mkdirs();
}
File manifestFile = new File(
os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION)
: (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION),
@ -104,6 +109,10 @@ public class NativeMessagingHostInstaller {
return;
}
} else {
File manifestFolder = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION);
if (!manifestFolder.exists()) {
manifestFolder.mkdirs();
}
File manifestFile = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION,
"xdmff.native_host.json");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(),