From 544c8a1fa7410bfd840d4f2beba8a7fbb1f5a3c2 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 13 Feb 2012 03:13:28 -0500 Subject: [PATCH] Send Content-Type even when body is empty --- chrome/content/zotero/xpcom/server.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/server.js b/chrome/content/zotero/xpcom/server.js index f549709939..1d7867c6bd 100755 --- a/chrome/content/zotero/xpcom/server.js +++ b/chrome/content/zotero/xpcom/server.js @@ -303,10 +303,11 @@ Zotero.Server.DataListener.prototype._generateResponse = function(status, conten } } + if(contentType) { + response += "Content-Type: "+contentType+"\r\n"; + } + if(body) { - if(contentType) { - response += "Content-Type: "+contentType+"\r\n"; - } response += "\r\n"+body; } else { response += "Content-Length: 0\r\n\r\n";