Index: src/main/java/org/fluidproject/kettle/ResourceUtil.java =================================================================== --- src/main/java/org/fluidproject/kettle/ResourceUtil.java (revision 9308) +++ src/main/java/org/fluidproject/kettle/ResourceUtil.java (working copy) @@ -128,9 +128,10 @@ * will be propagated. */ - public static void copyBytes(byte[] bytes, OutputStream os) { + public static void copyString(String tosend, OutputStream os) { try { - os.write(bytes); + String s = tosend.toString(); + os.write(s.getBytes("UTF-8")); } catch (Exception e) { throw UniversalRuntimeException.accumulate(e, "Error copying to output"); Index: src/main/webapp/kettle/js/env.js =================================================================== --- src/main/webapp/kettle/js/env.js (revision 9308) +++ src/main/webapp/kettle/js/env.js (working copy) @@ -695,14 +695,14 @@ for (var header in self.headers) connection.addRequestProperty(header, self.headers[header]); + connection.connect(); + // PATCH: Sveto/AMB - text = new java.lang.String( data || "" ); + text = new java.lang.String( data || "" ); if (text.length() > 0) { - var bytes = text.getBytes("UTF-8"); - connection.setRequestProperty("Content-Length", bytes.length); // Write content to the connection's stream var out = connection.getOutputStream(); - Packages.org.fluidproject.kettle.ResourceUtil.copyBytes(bytes, out); + Packages.org.fluidproject.kettle.ResourceUtil.copyString(text, out); } // Stick the response headers into responseHeaders @@ -761,7 +761,6 @@ } catch (e) { // PATCH: AMB - console.debug("Received exception " + e + " message " + e.message); //self.readyState = 4; //self.errorThrown = e; self.textStatus = e.message;