]> granicus.if.org Git - transmission/commitdiff
(trunk, web) #5500 - don't add the X-Transmission-Session-Id header if we don't have...
authorJordan Lee <jordan@transmissionbt.com>
Sun, 20 Oct 2013 17:09:46 +0000 (17:09 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sun, 20 Oct 2013 17:09:46 +0000 (17:09 +0000)
web/javascript/remote.js

index af6ef7d42e57ed8bea0bc62b70d9247c27b09bcf..dfd7e749f4b69d2ae341365e9dddafa10ce24364 100644 (file)
@@ -69,7 +69,9 @@ TransmissionRemote.prototype =
        },
 
        appendSessionId: function(XHR) {
-               XHR.setRequestHeader('X-Transmission-Session-Id', this._token);
+               if (this._token) {
+                       XHR.setRequestHeader('X-Transmission-Session-Id', this._token);
+               }
        },
 
        sendRequest: function(data, callback, context, async) {