aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 77fc5d79..f0d9b693 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -772,8 +772,10 @@ function requestUri(xhr, uri, needsSig) {
xhr.open("POST", uri, true);
xhr.setRequestHeader("Content-type", "text/plain");
- xhr.setRequestHeader("Content-length", "0");
- xhr.setRequestHeader("Connection", "close");
+ try {
+ xhr.setRequestHeader("Content-length", "0");
+ xhr.setRequestHeader("Connection", "close");
+ } catch (e) { }
if (client_id != null) {
xhr.setRequestHeader("UrWeb-Client", client_id.toString());