четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) {
document.getElementById("myTextarea").value = "";
alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText;
document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (502 Bad Gateway).
In Cache's native studio, this size of routine is recorded and compiled - everything works fine.
I got the impression that there is a limit on the size of the transmitted string.