www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e1e21a4f3948ba84da66ee6a8c96113ccec9a4f4
parent d53cb8a77d9d18dea39c5c67a0f36e03da2d65f2
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu,  1 Sep 2011 07:50:53 +0000

Fix bug in last commit


Diffstat:
Mchrome/content/zotero/xpcom/server.js | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/server.js b/chrome/content/zotero/xpcom/server.js @@ -295,12 +295,11 @@ Zotero.Server.DataListener.prototype._generateResponse = function(status, conten response += "X-Zotero-Connector-API-Version: "+CONNECTOR_API_VERSION+"\r\n"; const originRe = /[\r\n]Origin: +([^ \r\n]+)/i; - Zotero.debug(this.header); var m = originRe.exec(this.header); if(m && (m[1] === "https://www.zotero.org" || m[1] === "http://www.zotero.org")) { - headers += "Access-Control-Allow-Origin: "+m[1]+"\r\n"; - headers += "Access-Control-Allow-Methods: POST, GET, OPTIONS\r\n"; - headers += "Access-Control-Allow-Headers: Content-Type,X-Zotero-Connector-API-Version,X-Zotero-Version\r\n"; + response += "Access-Control-Allow-Origin: "+m[1]+"\r\n"; + response += "Access-Control-Allow-Methods: POST, GET, OPTIONS\r\n"; + response += "Access-Control-Allow-Headers: Content-Type,X-Zotero-Connector-API-Version,X-Zotero-Version\r\n"; } }