diff --git a/release/antos-1.2.0.tar.gz b/release/antos-1.2.0.tar.gz index a7fd337..3662cb3 100644 Binary files a/release/antos-1.2.0.tar.gz and b/release/antos-1.2.0.tar.gz differ diff --git a/src/core/core.ts b/src/core/core.ts index b2a913f..bc2de37 100644 --- a/src/core/core.ts +++ b/src/core/core.ts @@ -1138,7 +1138,6 @@ namespace OS { return $.ajax({ type: "POST", url: p, - headers: { 'Connection': 'close'}, contentType: "application/json", data: JSON.stringify( d, @@ -1227,7 +1226,6 @@ namespace OS { url: p, data: formd, type: "POST", - headers: { 'Connection': 'close'}, contentType: false, processData: false, }) diff --git a/src/core/handles/RemoteHandle.ts b/src/core/handles/RemoteHandle.ts index df00593..78385d0 100644 --- a/src/core/handles/RemoteHandle.ts +++ b/src/core/handles/RemoteHandle.ts @@ -162,7 +162,7 @@ namespace OS { * which contains an error or a list of FileInfoType */ export function scandir(p: string): Promise { - const path = `${REST}/VFS/scandir`; + const path = `${REST}/VFS/scandir?__t=${(new Date()).getTime()}`; return API.post(path, { path: p }); } @@ -176,7 +176,7 @@ namespace OS { * which contains an error or true on success */ export function mkdir(p: string): Promise { - const path = `${API.REST}/VFS/mkdir`; + const path = `${API.REST}/VFS/mkdir?__t=${(new Date()).getTime()}`; return API.post(path, { path: p }); } @@ -194,7 +194,7 @@ namespace OS { p: string, pub: boolean ): Promise { - const path = `${API.REST}/VFS/publish`; + const path = `${API.REST}/VFS/publish?__t=${(new Date()).getTime()}`; return API.post(path, { path: p, publish: pub }); } @@ -207,7 +207,7 @@ namespace OS { * which contains an error or an object of FileInfoType */ export function fileinfo(p: string): Promise { - const path = `${API.REST}/VFS/fileinfo`; + const path = `${API.REST}/VFS/fileinfo?__t=${(new Date()).getTime()}`; return API.post(path, { path: p }); } @@ -244,7 +244,7 @@ namespace OS { * which contains an error or a success response */ export function move(s: string, d: string): Promise { - const path = `${API.REST}/VFS/move`; + const path = `${API.REST}/VFS/move?__t=${(new Date()).getTime()}`; return API.post(path, { src: s, dest: d }); } @@ -257,7 +257,7 @@ namespace OS { * which contains an error or a success response */ export function remove(p: string): Promise { - const path = `${API.REST}/VFS/delete`; + const path = `${API.REST}/VFS/delete?__t=${(new Date()).getTime()}`; return API.post(path, { path: p }); } @@ -283,7 +283,7 @@ namespace OS { export function packages( d: PackageCommandType ): Promise { - const path = `${API.REST}/system/packages`; + const path = `${API.REST}/system/packages?__t=${(new Date()).getTime()}`; return API.post(path, d); } @@ -295,7 +295,7 @@ namespace OS { * @returns {Promise} a promise on a [[RequestResult]] */ export function upload(d: string): Promise { - const path = `${API.REST}/VFS/upload`; + const path = `${API.REST}/VFS/upload?__t=${(new Date()).getTime()}`; return API.upload(path, d); } @@ -311,7 +311,7 @@ namespace OS { p: string, d: string ): Promise { - const path = `${API.REST}/VFS/write`; + const path = `${API.REST}/VFS/write?__t=${(new Date()).getTime()}`; return API.post(path, { path: p, data: d }); } @@ -350,7 +350,7 @@ namespace OS { if (ws) { return new Promise(function (resolve, reject) { try { - const path = `${API.BASE_URI}/system/apigateway?ws=1`; + const path = `${API.BASE_URI}/system/apigateway?ws=1&__t=${(new Date()).getTime()}`; const proto = window.location.protocol === "https:" ? "wss://" @@ -362,7 +362,7 @@ namespace OS { } }); } else { - const path = `${API.REST}/system/apigateway?ws=0`; + const path = `${API.REST}/system/apigateway?ws=0&__t=${(new Date()).getTime()}`; return API.post(path, d); } } @@ -375,7 +375,7 @@ namespace OS { * contains an error or a [[UserSettingType]] object */ export function auth(): Promise { - const p = `${API.REST}/user/auth`; + const p = `${API.REST}/user/auth?__t=${(new Date()).getTime()}`; return API.post(p, {}); } @@ -388,7 +388,7 @@ namespace OS { * contains an error or a [[UserSettingType]] object */ export function login(d: UserLoginType): Promise { - const p = `${API.REST}/user/login`; + const p = `${API.REST}/user/login?__t=${(new Date()).getTime()}`; return API.post(p, d); } @@ -399,7 +399,7 @@ namespace OS { * @returns {Promise} a promise on a [[RequestResult]] */ export function logout(): Promise { - const p = `${API.REST}/user/logout`; + const p = `${API.REST}/user/logout?__t=${(new Date()).getTime()}`; return API.post(p, {}); } @@ -410,7 +410,7 @@ namespace OS { * @returns {Promise} a promise on a [[RequestResult]] */ export function setting(): Promise { - const p = `${API.REST}/system/settings`; + const p = `${API.REST}/system/settings?__t=${(new Date()).getTime()}`; return API.post(p, OS.setting); } @@ -463,7 +463,7 @@ namespace OS { cmd: string, d: GenericObject ): Promise { - const path = `${API.REST}/VDB/${cmd}`; + const path = `${API.REST}/VDB/${cmd}?__t=${(new Date()).getTime()}`; return API.post(path, d); } }