The post request fails due to a content-header issue. Force the content header to "application/x-www-form-urlencoded" to work around the problem.
var x = new XMLHttpRequest();
var url = "http://mydomain"
x.open("POST", url);
x.setRequestHeader("content-type", "application/x-www-form-urlencoded");
x.onreadystatechange = function() {
console.log(x.status);
console.log(x.statusText);
console.log(x.readyState);
console.log(x.responseText);
console.log(x.resposneXML);
console.log(x.getAllResponseHeaders());
};
x.send("a=123&b=456&c=789");
This report refers probably to a bug-fix in 4.99.11 (see NEWS file); in earlier versions of naviserver, the content parser for www-form-urlencoded content was applied to ALL POST content of post requests, leading to potentatial memory bloats (when e.g. large binary content was transmitted via POST), strange results (when the content was e.g. json encoded) and in some cases to crashes (potentially invalid UTF8). Therefore, the parsing for url-encoded content is now only performed, when requested by the client via the content type.
Below are two test scripts based on the submitted report to show the behavior in detail.
Please feel free to reopen the issue, in case i misunderstood the issue.
bug78-client.tcl
bug78.tcl