From: Tom Clegg Date: Fri, 10 Jul 2015 15:18:46 +0000 (-0400) Subject: 6279: Do not set content-length headers in XHR. X-Git-Tag: 1.1.0~1511^2~3 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/6929750b2f8f1f0b01b40f0ac516ec5f9e431c4d 6279: Do not set content-length headers in XHR. According to error messages in Chrome console: Refused to set unsafe header "Content-Length" ShellInABox.sendRequest @ shell_in_a_box.js:178 ShellInABox.onReadyStateChange @ shell_in_a_box.js:206 (anonymous function) @ shell_in_a_box.js:183 --- diff --git a/apps/workbench/public/webshell/shell_in_a_box.js b/apps/workbench/public/webshell/shell_in_a_box.js index 448bfda59a..6fdf10d721 100644 --- a/apps/workbench/public/webshell/shell_in_a_box.js +++ b/apps/workbench/public/webshell/shell_in_a_box.js @@ -175,7 +175,6 @@ ShellInABox.prototype.sendRequest = function(request) { (this.session ? '&session=' + encodeURIComponent(this.session) : '&rooturl='+ encodeURIComponent(this.rooturl)); - request.setRequestHeader('Content-Length', content.length); request.onreadystatechange = function(shellInABox) { return function() { @@ -233,7 +232,6 @@ ShellInABox.prototype.sendKeys = function(keys) { '&height=' + this.terminalHeight + '&session=' +encodeURIComponent(this.session)+ '&keys=' + encodeURIComponent(keys); - request.setRequestHeader('Content-Length', content.length); request.onreadystatechange = function(shellInABox) { return function() { try {