From: erickson Date: Sun, 20 Aug 2006 15:58:12 +0000 (+0000) Subject: auth header happy in xul now X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4b4f353bd92ea26555bd0bfeafacc332eb9b8f1e;p=Evergreen.git auth header happy in xul now git-svn-id: svn://svn.open-ils.org/ILS/trunk@5609 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/common/js/RemoteRequest.js b/Open-ILS/web/opac/common/js/RemoteRequest.js index 9ee729509e..d53269112b 100644 --- a/Open-ILS/web/opac/common/js/RemoteRequest.js +++ b/Open-ILS/web/opac/common/js/RemoteRequest.js @@ -258,22 +258,11 @@ RemoteRequest.prototype.send = function(blocking) { } try { - var ses; - - try { ses = cookieManager.read(COOKIE_SES) } catch(ee) {} - - if( !ses && isXUL() ) { - /* - JSAN.use('OpenILS.data'); - var data = new OpenILS.data(); - data.init({'via':'stash'}); - ses = data.session.key; - dump('Setting authtoken header: ' + ses + ' : ' + url + '\n'); - */ - } - - if( ses ) - this.xmlhttp.setRequestHeader('X-OILS-Authtoken', ses); + var auth; + try { auth = cookieManager.read(COOKIE_SES) } catch(ee) {} + if( !auth && isXUL() ) auth = ses(); + if( auth ) + this.xmlhttp.setRequestHeader('X-OILS-Authtoken', auth); } catch(e) {}